net_lover [Original]
This article is placed here as a backup.
<script>
var oDiv
varxh
function getXML()
{
oDiv = document.all.m
oDiv.innerHTML = "Loading column data, please wait..."
oDiv.style.display= ""
xh = new ActiveXObject("Microsoft.XMLHTTP")
xh.onreadystatechange = getReady
xh.open("GET",a.value,true)
xh.send()
}
function getReady()
{
if(xh.readyState==4)
{
if(xh.status==200)
{
oDiv.innerHTML = "Complete"
}
else
{
oDiv.innerHTML = "Sorry, failed to load data. Reason:" + xh.statusText
}
}
}
</script>
<body>
Example of xmlhttp asynchronous:
URL:<input name=a value=" http://www.downcodes.com " style="width:600px">
<input onclick="getXML()" type="button" value="Get source code">
<input onclick="if(xh && xh.responseText) {alert(xh.responseText);oDiv.innerHTML=xh.responseText}" type="button" value="Show source code">
<div id=m></div>