we have looked at how to delete nodes from the web page and also how to add new nodes into the web page. The replaceNode command allows you to do both types of update simultaneously.
- The Basics
- Basic DOM
- DOM Tables
- DOM Forms
- Server Interaction
- Regular Expressions
- Error Handling
- Using Functions
- Object Oriented
- Extend Objects
- Homework Questions
- The Bad Bits
The second and slightly more complicated way to add new content into the web page is used where you want to add the new content at the same level as existing content where you know the node that you want to insert the content before.
There are two ways you can add the nodes that you have built into the actual web page. The easier of the two is where you want to add the new content as a child of something already in the page where you can use the same appendChild command you used for combining the nodes […]
The one node type that never actually appears in a web page is a document frafment node. It is easy enough to combine nodes together before adding them to the web page (so as to have the entire update appear at once) when the nodes you are creating are all contained as children of one […]
Just being able to create new nodes representing the component parts of a web page is notusually enough by itself to achieve our desired result. There are situations such as preloading images where the image element doesn’t need to be attached into the web page to be useful but most of the time we need […]
This site is © copyright Stephen Chapman - Felgall Pty Ltd 2011-2015.