I write this code For my web file simply. but this have one error(bug) in my js file. this is the js file ; //---------------------------------------------------------- //get Element by id function getEl(id){ return document.getElementById(id); } //create element by tag name function createEl(tag){ return document.createElement(tag); } //change one object's class function changeCss(obj,css){ obj.className=css; } //create ajax object function createAjax(){ var xmlHttp=null; try{ // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e){ // Internet Explorer try{ xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e){ xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } //Ajax Object function Ajax(div,url){ this.ajax = createAjax();//Create ajax object (xmlhtmlrequest object) this.url = url; //request url this.div = getEl(div); //display response message div this.send = function(){ //ajax=this.ajax; this.ajax.open("GET",this.url,true); this.ajax.onreadystatechange=this.ajaxOk; this.ajax.send(null); };//send request this.ajaxOk = function(){ alert(typeof(this.ajax)); // error at this line if(this.ajax.readyState == 4 && this.ajax.status == 200) this.div.innerHTML=this.ajax.responseText; };//get message and display it } //---------------------------------------------------------------- then i use it with this code //------------------------------------------------------------------- function viewMessageList(action){ var url="NoticeList.asp"; var div="bodyMain"; url+="?Action="+action+"&t="+new Date().getTime(); var ajaxObj=new Ajax(div,url); ajaxObj.send(); } //---------------------------------------------------------------------- but It not do i want , it show this "undefine". someone can help! thinks!