mocambo wrote:
> $(id).observe('click', this.add( 'name' ).bindAsEventListener(this));
>
> As we know, event handler passed as argument to handler function.
> Sample above not correct, but how to add 'name' string argument to
> handler function?
If you have 1.6, you can do
$(id).observe('click', this.add.bind(this, 'name'));
This will put 'name' in the first parameter to this.add().
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---