« Formula One Tracks & News - Tiny "Loading" Addition ;) | Main | MapYourBuddies Iteration2Review - Summary as of Wednesday (04/11/07) 05:00pm (Part 2) »

RE: "DOM - Document Object Modeling - Help" (Milot's Blog)

Concerning Milot's question:

"I know that the requirement for mini project 3 is to incorporate DOM methods. My question is, not why and how; but what do I need to use the DOM for?"

Maybe my "Formula One Tracks & News Mini-Project" could help you to understand the usage of DOM as I have incorporated a couple of DOM methods.

For example my main page Source Code contains a "Loading ..." image in the RSS News Box (see source code)

<div id="trackslist" class="trackslist"> <p id="FLloading" style="text-align: center"><br /> <img src="images/waiting.gif" alt="Please Wait" border=0> <br /><br />Loading... Please Wait</p> </div>

What I am doing, after the RSS news XML file is available in the request/response object, I replace this <div> tag with a new "constructed" one (that then contains the RSS News).
More details also here.

I "construct" the new div tag (then with the RSS News) in this createrssfeed.js file and finally replace the old with the new div tag.

I hope this gives you an idea, what you can do with the DOM methods. Honestly, I love them ;)

If you still have questions, just trackback ;)
-Joern