From: Mike B. <mb...@Ga...> - 2004-10-18 10:47:53
|
Vinay Murthy wrote: > I would want to know of a way to get access to a window that may pop > up when an "anchor" gets clicked. Should I be using WebClient's > getCurrentWindow() ? The click() method will return the new page that was loaded (or the current page if a new page wasn't loaded). You can ask that page what window it is in with getEnclosingWindow(). > Also I noticed that, on a particular page, whenever I clicked on an > anchor that produced a pop up, I ended up with an exception trace > like: > > EcmaError: lineNumber=[1] column=[6] lineSource=[return frmSubmit()] > name=[SyntaxError] sourceName=[body.onLoad] message=[invalid return] > errorObject=[SyntaxError: invalid return] > com.gargoylesoftware.htmlunit.ScriptException: invalid return The problem is in the onload handler of the new page that has just been loaded. What does frmSubmit() return? -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |