<html>
<head>
<script type="text/javascript">
function getPage()
{
var objHTTP = new ActiveXObject("Microsoft.XMLHTTP")
alert ("Created HTTP object");
objHTTP.Open('GET','objHTTP.Send();
document.all['A1'].innerText= objHTTP.status;
document.all['A2'].innerText= objHTTP.statusText;
document.all['A3'].innerText= objHTTP.responsexml.getElementsByTagName('InputZipCode');
document.all['A4'].innerText= objHTTP.responsetext;
alert('The firstname is ' + firstnames[0]);
}
</script>
</head>
<body onload="getPage()">
<h2>Using the HttpRequest Object</h2>
<p>
<b>status:</b>
<span ID="A1"></span>
</p>
<p>
<b>status text:</b>
<span ID="A2"></span>
</p>
<p>
<b>response1:</b>
<br><span ID="A3"></span>
</p>
<p>
<b>response:</b>
<br><span ID="A4"></span>
</p>
</body>
</html>
I am attempting to query an XML output to a web page.
The above code is a sample of what I'm running.
the response: line pulls all the raw xml which is good
but I'd like to put all the data in readable format.
The response1 line just returns [object] with no other data.
Is there away to feed the data to the web page in a readable way?
Eventually I'd like to insert the data into a database.
Can someone help me with this code.
<head>
<script type="text/javascript">
function getPage()
{
var objHTTP = new ActiveXObject("Microsoft.XMLHTTP")
alert ("Created HTTP object");
objHTTP.Open('GET','objHTTP.Send();
document.all['A1'].innerText= objHTTP.status;
document.all['A2'].innerText= objHTTP.statusText;
document.all['A3'].innerText= objHTTP.responsexml.getElementsByTagName('InputZipCode');
document.all['A4'].innerText= objHTTP.responsetext;
alert('The firstname is ' + firstnames[0]);
}
</script>
</head>
<body onload="getPage()">
<h2>Using the HttpRequest Object</h2>
<p>
<b>status:</b>
<span ID="A1"></span>
</p>
<p>
<b>status text:</b>
<span ID="A2"></span>
</p>
<p>
<b>response1:</b>
<br><span ID="A3"></span>
</p>
<p>
<b>response:</b>
<br><span ID="A4"></span>
</p>
</body>
</html>
I am attempting to query an XML output to a web page.
The above code is a sample of what I'm running.
the response: line pulls all the raw xml which is good
but I'd like to put all the data in readable format.
The response1 line just returns [object] with no other data.
Is there away to feed the data to the web page in a readable way?
Eventually I'd like to insert the data into a database.
Can someone help me with this code.