A page at http://dhtml-menu.com/examples/ex3-dhtml-drop-down-menu.html contains a DHTML menu.
Each menu item is provided with an onclick handler, which is a JS function name. This function is defined in foreign file, linked under HTML HEAD:
<script type="text/javascript" language="JavaScript1.2" src="apymenu.js"></script>
For instance, element with id=apy0m5i0I has the following action: onclick="lIIIa(event,"apy0m5i0I");"
This function is defined in apymenu.js file.
But, click() method invocation on such element leads to the following exception:
EcmaError: lineNumber=[1] column=[0] lineSource=[<no source="">]</no> name=[ReferenceError] sourceName=[JavaScriptStringJob] message=[ReferenceError: "IllIa" is not defined. (JavaScriptStringJob#1)]
com.gargoylesoftware.htmlunit.ScriptException: ReferenceError: "IllIa" is not defined. (JavaScriptStringJob#1)
I've attached a source file which reproduces the error.
It is weird, but HtmlUnit eventually loads the referred page. Please, let me know if this error is relevant to HtmlUnit... And take my apologies if it is not
Thanks
Source code to produce the behaviour
With latest snapshot, this case works for me.
Please get it from http://build.canoo.com/htmlunit/artifacts, and advise if you have any issue
Now this works for me either.
Thank you