Hi
Last I wrote some code and have one problem and not found any
solutions. So I went the other way, but this was strange, maybe bug,
so check this.
I have on page one radio, example:
<input type="radio" name="colors" id="red" />Red<br />
And I want do this:
- automaticly select (click) radio
- detect select (click) and run function
I write this:
document.getElementsById("red")..addEventListener("click", function(){
//do something JS....
GM_getValue("sth");
GM_setValue("sth2", "aa");
}, false);
document.getElementsById("red").click();
Problem is that, when JS click on input automatically (click method) I
dont have acces to GM API (setValue and Get doesn't work). Any idea
whay?
What is interesting, when I personally click on radio (using mouse)
everything works fine. I replecae click method to checked = true, but
still the same. Maybe there is problem with scope of the function, but
now I don't know why.
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en.