Hi Niko, Thanks for the swift reply!
By 'handler' did you mean doing something like: $('myForm').observe('submit', function(){validateForm(event, param1)}); If so then that didn't work for me. Michael On Mar 10, 5:39 pm, "Nikodim Lazarov" <[EMAIL PROTECTED]> wrote: > Hi, > > The answer to your question is yes. Still you need to change the handler > to this: > > function(event){validateForm(event, param1, param2)} > > and be very careful what happens with the variable scope, i.e. if the > parameters are visible in the current scope. > > Best Regards, > Niko > > On Mon, 10 Mar 2008 08:10:58 +0200, Michael Sharman <[EMAIL PROTECTED]> > wrote: > > > > > > > Hi again, > > > When you have an 'obeserver' setup as follows: > > > $('myForm').observe('submit', validateForm); > > > If a user submits the form the 'validateForm' function is called and > > is automagically passed the 'event' to work with. This is fantastic! > > > But is there a way to pass another argument to the function? Something > > like: > > > $('myForm').observe('submit', validateForm, param1, param2); > > > etc? > > > Michael > > -- > Best Regards, > Nikodim Lazarov --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---