[Prototype-core] Re: Why are all children of an 'update'd element being purged?

2010-07-03 Thread Viktor Kojouharov
I understand that. And I was using update to clear the container and add a new element. My problem was, I have a reference to the previous element of the container that was just cleared, and I am saving that reference of the element with the intention of replacing the new container content with

Re: [Prototype-core] Re: Why are all children of an 'update'd element being purged?

2010-07-03 Thread Allen Madsen
Element#replace may be what you are looking for. Allen Madsen http://www.allenmadsen.com On Sat, Jul 3, 2010 at 6:00 AM, Viktor Kojouharov vkojouha...@gmail.com wrote: I understand that. And I was using update to clear the container and add a new element. My problem was, I have a reference

[Prototype-core] Re: Why are all children of an 'update'd element being purged?

2010-07-03 Thread joe t.
Thanks for the clarification. Most methods that change content destroy the old content in favor of the new. The same is true for #replace suggested above. If you need to retain content while putting new content in its place, you may need a deep-clone method (which i've requested in the past and