Codice PHP:
function tmp() {
    
this.obj=new XMLHttpRequest();
    
this.cp=function () {
        if (
this.obj.readyState==0) {//Uninitialized
            //
        
}
        if (
this.obj.readyState==1) {//Loading
            
document.getElementById("mypage").innerHTML="Loading...";
        }
        if (
this.obj.readyState==2) {//Loaded
            //
        
}
        if (
this.obj.readyState==3) {//Interactive
            //
        
}
        if (
this.obj.readyState==4) {//Complete
            
document.getElementById("mypage").innerHTML=this.obj.responseText;
        }
    }
}

var 
k=new tmp();
k.obj.onreadystatechange=function(){
    
k.cp();
}
try {
    
k.obj.open("GET","iwdn.php",true);
    
k.obj.send(null);
} catch(
e) {
    
alert("Problems in loading the page");