Tip, Moving DOM nodes
How to avoid Wrong document exceptions
From the developerWorks archives
Date archived: December 6, 2016 | First published: March 01, 2001
This tip takes a look at a common exception that occurs when you attempt to move DOM nodes. Here you'll learn the causes of this exception and, most important, how to avoid it when doing DOM programming. The code listings demonstrate how to move nodes from one document to another, what the code that generates the dreaded Wrong document exception looks like, and how to write correct code that doesn't present this problem. This tip assumes that you already know the basics about how to work with the DOM."
This content is no longer being updated or maintained. The full article is provided "as is" in a PDF file. Given the rapid evolution of technology, some steps and illustrations may have changed.