Re: cliente-side dynamic XSLT transformation with javascript

Martin Honnen <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Liberty Development
Message-ID <[email protected]>

..tato.. wrote:


> I tried the fragment approach before but lacked knowledge...
> //frmBot is the frame name
> //display is an <div id="display">
> var target = parent.frmBot.document.getElementById("display");
> while (target.hasChildNodes())
> { target.removeChild(target.childNodes[0]);
>    target.appendChild(xmlNode);
> }

I think you want

while (target.hasChildNodes()) {
   target.removeChild(target.lastChild);
}
target.appendChild(createdDocumentFragment);


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.