Subj : JavaScript problem when used inside HtmlUnit
To : netscape.public.mozilla.jseng
From : dimon37@gmail.com
Date : Mon Dec 20 2004 11:40 am
Hi. I have this problem:
I am using HtmlUnit to test our web application, but the application is
heavy on javascript and it is optimized for IE 6.0. At one point there
is a line like this:
document.getElementById('anchor1').onclick=function(){somefunction(arg1,
arg2);}
I know that this line is executed, because getElementById('anchor1') is
executed and it returns an object. But onclick attribute is never
assigned. At least I never see the assignment even though I have a
breakpoint is setAttributeValue on HtmlElement. Also inside the click()
method the value of onclick remains to be empty. Anybody has an idea
how to fix this or os this a known issue?
Vadim
P.S. On the browser itself, everythign works as intended.
.