function ajax()
{
var xmlhttp=createXMLHttp();
this.url_str='';//php后台文件
this.div_id='';//加载的图层id
this.str='';//传送的数据
var that=this;
this.cc=function()
{
xmlhttp.onreadystatechange=function ()
{
if(xmlhttp.readyState==4)
{
document.getElementById(that.div_id).innerHTML=xmlhttp.responseText;
document.getElementById("newDrag").style.display="block";
document.getElementById(that.div_id).style.display='block';
}
}
xmlhttp.open('POST',this.url_str,true);
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.send(this.str);
}
}
var aa=new ajax();
aa.url_str='mission.php';
aa.div_id='newBody';
aa.str="user_id="+user_id+'&type='+type+"&id="+id+"&other="+other;
aa.cc();现在要在对象实例里面要执行一段任务列表程序 重新读取任务列表数据 那我该怎么样才能在确保aa.cc()全部执行完毕后执行这段程序应该明了了 高手赐教
{
var xmlhttp=createXMLHttp();
this.url_str='';//php后台文件
this.div_id='';//加载的图层id
this.str='';//传送的数据
var that=this;
this.cc=function()
{
xmlhttp.onreadystatechange=function ()
{
if(xmlhttp.readyState==4)
{
document.getElementById(that.div_id).innerHTML=xmlhttp.responseText;
document.getElementById("newDrag").style.display="block";
document.getElementById(that.div_id).style.display='block';
}
}
xmlhttp.open('POST',this.url_str,true);
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.send(this.str);
}
}
var aa=new ajax();
aa.url_str='mission.php';
aa.div_id='newBody';
aa.str="user_id="+user_id+'&type='+type+"&id="+id+"&other="+other;
aa.cc();现在要在对象实例里面要执行一段任务列表程序 重新读取任务列表数据 那我该怎么样才能在确保aa.cc()全部执行完毕后执行这段程序应该明了了 高手赐教
document.getElementById(that.div_id).style.display='block';
fnCallback();
};
调用:function test(){
alert(1);
}
aa.cc(test);
但是我传递参数的时候 有的时候能够读出并显示 有的时候不能
aa.cc(mission_book_mylist(id,'mylist'));这段是重新显示任务列表的 这要如何处理