Juergen Schreck wrote: > Hi, > > I'm trying out a few AJAX things. > > Among other things I'm wrestling a bit with the decision of using > JSON vs. HTML snippets. For now I'm planning to go with HTML snippets. > > What are the rules when I swap out elements in DOM part that had > signals attached to it? > > Is there an easy way [in MochiKit] to update/reconnect signals to the > new elements (a la Behaviour)? > Or do I need to disconnect those signals before replacing the DOM and > then reconnect everything again? > > TIA >
hi i'm not shure if a disconnect is required ... but yes you should disconnect before removal if you heavily swap/replace dom content just connect the container and get signal sources by domEventObj.target() (http://mochikit.com/doc/html/MochiKit/Signal.html#dom-custom-event-object-reference) markus > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" 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/mochikit -~----------~----~----~----~------~----~------~--~---
