from the archive that is my gmail inbox...

Event.observe(oneElement , 'click',  function(){
   this.one_method()
}.bind(this));



On Nov 8, 2007 5:13 PM, Martin <[EMAIL PROTECTED]> wrote:

>
> Hi all
>
> I'm new to Prototype, and am stuck at trying to bind an on click event-
> listener to some table rows.
>
> I have normal table (don't worry, it IS tabular data).
> I would like a certain function to fire when rows with a specific
> className is clicked, so I do this:
> var theRows = $$('tr.details');
>
> Now, I then try to use the 'each' function,like this:
> trs.each(Event.observe(Element,'onclick',myFunction('')));
> Obviously wrong ...
>
> I've digged through the api-docs, but can't find the correct way to do
> this.
>
> Any ideas?
>
> Best regards
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to