From: Mike B. <mb...@Ga...> - 2004-10-26 13:17:34
|
Vinay Murthy wrote: > Do onClick attributes get wrapped by GargoyleWrapper0() ? I have a > button whose onclick attribute corresponds to calling a javascript > function. As I click the button, the ScriptPreProcessor traps a js > corresponding to "function GargoyleWrapper0() { Submitform("XYZ")} " > Is this normal ? Could you please help me figure out what might be > happening here ? I would normally expect the ScriptPreProcessor to > trap all js snippets appearing in a page. And if it has trapped the > one mentioned above, was the wrapper added into the response somewhere > by HtnlUnit ? Any time there is javascript specified in an event handler (ie onload) then we wrap it in a generated javascript function and execute it. These functions are named "GargoyleWrapper" + some unique number. We have to do this so that we can trap return values from the event handlers. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |