Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AppendChild() behavior on div
Message
From
15/03/2016 15:16:25
 
 
To
15/03/2016 14:24:33
General information
Forum:
Javascript
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01633130
Message ID:
01633138
Views:
69
This message has been marked as the solution to the initial question of the thread.
>I would like to verify something in regards to how the appendChild() works.
>
>I have this code:
>
>
>oDiv=toIFrame.document.getElementById(tcDiv)
>document.body.appendChild(oDiv)
>
>
>When this executes, oDiv is a reference to another document for a div object.
>
>The next line appends the master document with that div Html code.
>
>However, appendChild() destroys the object on the other document.
>
>What can I do to prevent that?
oDiv = toIFrame.document.getElementById(tcDiv).cloneNode(true);

document.body.appendChild(oDiv);
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform