Ajax
var xmlhttp;
var url = "test";
function loadXMLDoc(){
if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();}
else{xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}
if(xmlhttp != null){
xmlhttp.onreadystatechange=state_Change;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
else{alert("Your browser dose not support XMLHTTP.");}
}
function state_Change(){
if(xmlhttp.readyState==4 ){
if(xmlhttp.status==200){
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
}
else{
alert("Problem retrieving data:" +xmlhttp.statusText);
}
}
}