How to add on to an existing onclick event?
Posted
by Corey Sarnia
on Stack Overflow
See other posts from Stack Overflow
or by Corey Sarnia
Published on 2010-05-25T22:05:13Z
Indexed on
2010/05/25
22:11 UTC
Read the original article
Hit count: 180
I'm currently writing a Greasemonkey script for a page, so I can't modify the script myself.
There is a form submit button on the page. When you click this button, it executes some fancy AJAX calls and such to update the page and do serverside things. What I'm trying to is basically set a "lastClick" value when the button is clicked.
I want to add the code GM_setValue("lastClicked", (new Date()).getTime().toString())
to store the last time the button was clicked (for future uses of the script, it will actually do something with this date).
How exactly can I accomplish this?
© Stack Overflow or respective owner