View Single Post
Old 11-07-2012, 03:25 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,498
Thanks: 18
Thanked 362 Times in 361 Posts
sunfighter is on a distinguished road
This will read an xml file for you and place it into a div. I know that's not what you want but it's a start. "xmlhttp.responseText" is the returned file and you can now do with it as you like. You need to post the xml file or if too long a good portion of it. And explain what the client wants by an example. And you need to explain what you want also.
The javascript:
Code:
<script type="text/javascript">

function loadXMLDoc(url)
{
var xmlhttp;
var txt,xx,x,i;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById('txtCDInfo').innerHTML = xmlhttp.responseText;
    }
  }
xmlhttp.open("GET",url,true);
xmlhttp.send('');
}
</script>

<button onclick="loadXMLDoc('movies.xml');">PUSH</button><!--  PUT YOUR XML FILE NAME HERE-->
<div id="txtCDInfo"></div>
sunfighter is offline   Reply With Quote