View Single Post
Old 12-07-2012, 06:03 PM   PM User | #3
sinsysonline
New Coder

 
Join Date: Dec 2012
Posts: 15
Thanks: 4
Thanked 0 Times in 0 Posts
sinsysonline is an unknown quantity at this point
UPDATE: I've updated the code to look like this:

Code:
<div id="fitin">

<span id="Body0"></span>
</div>
<hr></hr>
<div id="slideshow">
   <div>
<p class="small">Post 5</p>
<span id="Body4"></span>
   </div>
   <div>
<p class="small">Post 2</p>
<span id="Body1"></span>
   </div>
   <div>
<p class="small">Post 3</p>
<span id="Body2"></span>
   </div>
   <div>
<p class="small">Post 4</p>
<span id="Body3"></span>
   </div>
</div>
</div>


<script>

if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.open("GET","...=xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;

var i=0,d;
while (d=document.getElementById["Body"+i]) 
d.innerHTML=xmlDoc.getElementsByTagName("Body")[i++].childNodes
[0].nodeValue;

</script>

EDIT: It doesn't pull the same data that it was pulling before and no posts show up now. It's as if it's not gathering the array correctly (or posting it onto the page)

Last edited by sinsysonline; 12-07-2012 at 07:13 PM..
sinsysonline is offline   Reply With Quote