[Greasemonkey] calling my script from a page

s g junkvendoremail at yahoo.com
Tue Jun 20 11:37:48 EDT 2006


i figured out how to pass params by:
   
    param = some-random-str;
   
     link.addEventListener( "click", function (){ onMasterClick( param ) }, false );

  i set up param to different strings several times for several different links.
   
  the problem is that now when the function is called - param is always the last one set.
   
  

Jeremy Dunck <jdunck at gmail.com> wrote:
  On 6/20/06, s g wrote:
> link.href = "javascript:my_function()";
>

link.addEventListener('click', my_function, false);

my_function should take an argument e.
If you want to prevent the click from doing it's normal think, you'll
want to call
e.preventDefault();
_______________________________________________
Greasemonkey mailing list
Greasemonkey at mozdev.org
http://mozdev.org/mailman/listinfo/greasemonkey


 		
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.


More information about the Greasemonkey mailing list