On 02/16/10 09:14, Seven wrote:
function myLittleFunction() {
// do my changes to the page
spanElement.addEventListener("click", myLittleFunction(), false);
}
http://wiki.greasespot.net/Getting_Help
"Equally important is providing the whole script, not just a few lines
of code."
From what you've provided, there's only a couple things that can
possibly be suggested.
One: What is "spanElement" here? Are we 100% sure that it's correct?
Two: You're passing "myLittleFunction()" as the second parameter:
_calling_ the function, and adding its return value as the event
listener callback. Almost definitely not what you want. The parens
shouldn't be there.
--
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.