[Greasemonkey] Re: Clicking a Button Programmatically

Jeremy Dunck jdunck at gmail.com
Wed May 24 17:35:48 EDT 2006


On 5/24/06, A. Alfred Ayache <alfred at lastbyte.ca> wrote:

> The original example used the HTMLFormElement class.  Since the target page used
> a button input element, I switched to HTMLInputElement.  Sadly, not only did
> this not work, but I got the following error:
>
> Error: HTMLInputElement.prototype has no properties

I don't have my copy of the book handy here and I don't know the whole
context of the example, so I'm not sure how to help.

> So, I moved on to a suggestion by Andre (?), which apparently was sent to him
> from Jeremy (Dunck?).

Not me, Aaron, I think.  Anyway...

>   If it's not, it sets it to All and hits the click event on the Refresh button.

The attached HTML and user script show that the onclick handler is
being called in this sandbox.

Perhaps you can share a simplified test case that represents the
problem you're seeing?
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: testclick.user.js
Type: application/x-javascript
Size: 307 bytes
Desc: not available
Url : http://mozdev.org/pipermail/greasemonkey/attachments/20060524/669cf3c7/testclick.user.js


More information about the Greasemonkey mailing list