Mouse click initMouseEvent() problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Mouse click initMouseEvent() problem

Rajat Gogri

initMouseEvent() from JRex is not working for me to simulate mouse click
event. Could any one please post the code.

I am using Jrex for seamonkey version. Do I need to change anything in
seamonkey code??

when I do DispatchEvent() it does not follow the link and returns false.

Please let me know the any changes needed in JRex or Seamonkey code to make
this code work. It is very urgent.

*I am pasting my code here*

JRexHTMLDocumentImpl htmlDOM =
HTMLCollection links = htmlDOM.getLinks();

JRexHTMLAnchorElementImpl link1 = (JRexHTMLAnchorElementImpl) links.item(1);
JRexEventTargetImpl clickEvent =
JRexMouseEventImpl mouseEvent = (JRexMouseEventImpl)
JRexDocumentViewImpl dv = (JRexDocumentViewImpl) ((JRexHTMLDocumentImpl)

mouseEvent.initMouseEvent("click", true, true, dv.getDefaultView(), 1, 1, 2,
1, 2, false, false, false,false, (short)0, clickEvent);
boolean check = clickEvent.dispatchEvent(mouseEvent);
dev-tech-dom mailing list
[hidden email]