[Greasemonkey] Re: Clicking a Button Programmatically
A. Alfred Ayache
alfred at lastbyte.ca
Wed May 24 17:57:00 EDT 2006
BTW, once I click the button, is the script terminated because I've requested
another? Or do I have to explicitly terminate the script? How would I do that?
Thanks,
A. Alfred Ayache
http://lphs76.ca - Reunion community
http://www.rentersPlus.com - Apartment Search
http://www.lastbyte.ca - Web Design, eCommerce, PHP/MySQL, Java, Oracle
Andre wrote:
> Hi Alfred,
>
> if 'elem' is your button, you need to do the following:
>
> evt=document.createEvent("MouseEvents");
> if(evt && evt.initMouseEvent) {
> evt.initMouseEvent("click",true,true,document.defaultView,
> 1,0,0,0,0,false,false,false,false,0,null);
> elem.dispatchEvent(evt);
> }
More information about the Greasemonkey
mailing list