Siah wrote:
[color=blue]
> I'd like to detach some of my dom elements and cache them in an object.
> My current options are to cache its innerHTML, or create an independent
> 'div' element and move the element as a child underneath that div
> element. There should be a way for me to just detach my element from
> document's dom tree and be able to set it into a variable.[/color]
You don't need the div, removeChild e.g.
someParentNode.removeChild(someChildNode)
will remove the node someChildNode from the children of the node
someParentNode and return the removed node.
<http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247>
And in terms of the DOM if you wanted to store several nodes temporarily
you could use a document fragment to keep those nodes. But IE 5 does not
support document fragment nodes for HTML documents.
--
Martin Honnen
http://JavaScript.FAQTs.com/