window.onload = makeRequest;
var xhr = false;
function makeRequest(){
if(window.XMLHttpRequest){
xhr = new XMLHttpRequest;
}
else {
if(window.ActiveXObject){
try{
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){}
}
}
if(xhr){
xhr.onreadystatechange = showState;
xhr.open("GET", "states.xml", true);
xhr.send(null);
}
else{
document.getElementById("updateArea").innerHTML = "Sorry";
}
}
var xhr = false;
function makeRequest(){
if(window.XMLHttpRequest){
xhr = new XMLHttpRequest;
}
else {
if(window.ActiveXObject){
try{
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){}
}
}
if(xhr){
xhr.onreadystatechange = showState;
xhr.open("GET", "states.xml", true);
xhr.send(null);
}
else{
document.getElementById("updateArea").innerHTML = "Sorry";
}
}
No comments:
Post a Comment