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/