Hello, I like to use parameters using Event.Observer. I want to send the event itself and some parameters to the handler function. Is there a way to do this? Here's my code. Unfortunately it doesn't work. Can anyone help me?
<html> <head> <title>Observer-Test</title> <script src="lib/prototype.js" type="text/javascript"></script> <script> function getKeyCode(event) { event = event || window.event; return event.keyCode; } function myKeyPress(event, Param1, Param2, Param3) { var charCode = getKeyCode(event); alert(charCode + 'Param1: ' + Param1); return false; } Event.observe(window, 'load', function() { Event.observe(myInputField, 'keyup', new Function('fx', 'myKeyPress(event, "Test1","Test2","Test3")')); }); </script> </head> <body> <input type="text" id="myInputField" value="" size="25" maxlength="255"> </body> </html> Bye Frank --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---