2009/2/24 david <david.brill...@gmail.com>: > > Hi, > > Why not relying on event delegation to a parent contener that will not > be delete or modify ?? > > btw, I thing the only problem is an excessive memory consuption. I did > not say/mean memory leak !! > There should not have more impact even. > > -- > david > > On 24 fév, 16:52, Richard Quadling <rquadl...@googlemail.com> wrote: >> Hi. >> >> I know that I need to stop observing on elements before I destroy them >> (say they are coming in via an AJAX connection). >> >> I know one way of handling this is to not actually attach events to >> dynamic content, but to the container and then use the bubbling >> effect. >> >> With that, the event handler for such a container may have several >> different paths through the code, depending upon the event and the >> element that triggered it. >> >> I suppose if the generic event handler was nothing more than a switch >> board, then the functions which is attached directly could remain as >> they are. >> >> Anyone know of anything else I should be aware of with this issue? >> >> Regards, >> >> Richard Quadling. >> >> -- >> ----- >> Richard Quadling >> Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498&r=213474731 >> "Standing on the shoulders of some very clever giants!" > > >
I've put a container around the dynamic elements. This will have all the event handlers attached. Most obvious really. Thank you. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" --~--~---------~--~----~------------~-------~--~----~ 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-scriptaculous@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 -~----------~----~----~----~------~----~------~--~---