sam
2008-Apr-02 13:19 UTC
Prototype: Triggering an event / calling an element''s event handlers
Hi all, After digging through to Prototype docs I couldn''t find the answer to the following question: How do you call an element''s handlers for a specific event? For instance, I want to call all ''click'' handlers I attached to a link. Calling its onclick() method is not it. Example code: ---- Assume I have a link ''foo'': Event.observe(''foo'', ''click'', doSomething); Event.observe(''foo'', ''click'', doSomethingElse); And I have a link ''bar'': Event.observe(''bar'', ''click'', function(e) { // *** Just how can I call all of ''foo''s click handlers here? } ---- --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---