function showState(){
if(xhr.readyState==4){
if(xhr.status==200){
var outMsg = xhr.responseText;
}else{
var outMsg = "<p>The current state is " + xhr.readyState + " and the status is " + xhr.status + "</p>";
}
}
document.getElementById("updateArea").innerHTML = outMsg;
}
if(xhr.readyState==4){
if(xhr.status==200){
var outMsg = xhr.responseText;
}else{
var outMsg = "<p>The current state is " + xhr.readyState + " and the status is " + xhr.status + "</p>";
}
}
document.getElementById("updateArea").innerHTML = outMsg;
}