|
Re: Tenplates and subtree plugins: msg#00019java.enhydra.xmlc
On Thursday 21 August 2003 00:54, Richard Keene wrote: > I want to take one document called layout.html and another called body.html > and take the main contents node (a div with id='mainContents') and > remove it from the > instance of bodyHTML.class and replace the div in an instance of > layoutHTML.class > with the removed div. > I have code like.... > layoutHTML L = new layoutHTML(); > bodyHTML t = new bodyHTML(); > // The div I want to replace. > HTMLElement centerMiddle = L.getElementCenterMiddle(); > // The div I want to plug into the layoutHTML object. > HTMLElement indexMainContents = t.getElementMainContents(); > HTMLElement nE = (HTMLEelemet.getDocument().importNode(t.getElementMainContents(),true); cenerMiddle.appendChild(newElement); > bodyMainContents.getParentNode().removeChild(indexMainContents); > centerMiddle.appendChild(t.getElementMainContents()); > It compiles and when I run it it says 'wrong document' > It appears that the indexMainContents retains the class id or something > of the > owning document t, and so when L goes to render it'sself to the browser > it recognizes that the nodes are from the wrong doc. Try someting like those two lines above.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Tenplates and subtree plugins, Petr Stehlik |
|---|---|
| Next by Date: | Re: Tenplates and subtree plugins, David H. Young |
| Previous by Thread: | Re: Tenplates and subtree plugins, David H. Young |
| Next by Thread: | Re: Tenplates and subtree plugins, Richard Keene |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |