Image

I need Javascript help....

FELLOW NERDS! PLEASE HELP!

This is what I have, a site loads. It has a news bar on the side (similar to an RSS feed). The news bar calls an XML file for it's info. Javascript loads the XML file on page load, and the span object is suppose to insert the XML data... SUPPOSE TO...

Here's my XML file (not pretty, but effective):




<?xml version="1.0" encoding="ISO8859-1" ?>
<feed>
  <date1>October 21, 2005</date1>
  <synopsis1>Finally got around to uploading the index page and framesets to my new homepage</synopsis1>
  <date2>October 20, 2005</date2>
  <synopsis2>Today I worked out the spacing issues for the framesets for the new homepage. Stay tuned for a preview...</synopsis2>
  <date3>October 20, 2005</date3>
  <synopsis3>Not much work today other than a personal LiveJournal update...</synopsis3>
</feed>

And here is the Java script in the head of the HTML page:

<script language="JavaScript"
for="window" event="onload">
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("feed.xml")
nodes = xmlDoc.documentElement.childNodes
date1.innerText = nodes.item(0).text
synopsis1.innerText = nodes.item(1).text
date2.innerText = nodes.item(2).text
synopsis2.innerText = nodes.item(3).text
date3.innerText = nodes.item(4).text
synopsis3.innerText = nodes.item(5).text
</script>


And the HTML to call it:

<td width="190" class="t12_orange"><span id="date1"></span></td>


Now, I KNOW the answer is staring me in the face, but I just can't put my finger on it. SOMEBODY HELP!