From: Marc G. <mgu...@ya...> - 2005-03-16 08:56:13
|
> Thanks for the reply. I believe the difficulty is > that onsubmit is treated as an attribute whose value > is a string. But when I assign to it, I am assigning > an InterpretedFunction object to it. Can this problem > be solved in the current architecture of HtmlUnit? > If so, how? I'd like to help implement it but I know > very little about HtmlUnit or Rhino. It took me > a few hours with the debugger just to find out the > difficulty above. you first need to make changes in com.gargoylesoftware.htmlunit.javascript.host.Form to add js setter and getter for onsubmit like what is done in com.gargoylesoftware.htmlunit.javascript.host.HTMLElement for different event handlers. Then you have to get this javascript function called in place of the interpretation of the string attribute when the form is submitted. All these changes can be done with current architecture of htmlunit. Marc. |