On 13 May 2010, at 18:53, Junkshops wrote:

*shakes fist at microsoft*

So click events bubble but submit events don't. That makes loads of
sense.

Given that, the delegation solution above won't work for forms, so in
that case is the only option to remove listeners prior to ajax loads
that'd overwrite the listeners' elements? If so, I suppose the best
thing to do is to store refs to the listeners in an array and
unregister them all prior to every ajax load.

NWEvents supports bubbling of the submit, focus and blur events. We're using it to do event delegated form validation (amongst others) and it works like a charm.

http://javascript.nwbox.com/NWEvents/

You can just use NWEvents and NWMatcher to define the event handler and then use Prototype for the actual event handling.


Best regards

Peter De Berdt

--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to