isExporting = true;
dojo.xhrPost({
url:"<%=request.getContextPath()%>/menuDBActionExpImp.action?operateFlag=exportTable",
[align=left]content:{
tablelist:tablename,
wh:'',
gs:gs,
ubkey:ubkey,
connkey:connkey,
sql:sql,
type:type,
fileName:filename,
isback:back},
handleAs:"text",
sync:false,
preventCache:false,
load: function(data,evt){
var jsonstr = JSON.parse(data);
// zys 2011-7-8 修改
if(!exportback.checked)//在前台执行导出
{
// 在前台导出时,cancel方法直接返回
isExporting = false;
document.getElementById("rmb_motai1").style.display="none";
document.getElementById("rmb_motai2").style.display="none";
cancleimg(jsonstr,sql,type);
}
else{//在后台执行导出
checkerror(jsonstr);
}
}
});
// zys 2011-7-8 添加
if(exportback.checked){
window.close();
}[/align]
在一个页面中 是dojo.xhrPost中的代码执行完成后再执行下面的 window.close();
吗?这2块代码是如何执行的一个过程?
dojo.xhrPost({
url:"<%=request.getContextPath()%>/menuDBActionExpImp.action?operateFlag=exportTable",
[align=left]content:{
tablelist:tablename,
wh:'',
gs:gs,
ubkey:ubkey,
connkey:connkey,
sql:sql,
type:type,
fileName:filename,
isback:back},
handleAs:"text",
sync:false,
preventCache:false,
load: function(data,evt){
var jsonstr = JSON.parse(data);
// zys 2011-7-8 修改
if(!exportback.checked)//在前台执行导出
{
// 在前台导出时,cancel方法直接返回
isExporting = false;
document.getElementById("rmb_motai1").style.display="none";
document.getElementById("rmb_motai2").style.display="none";
cancleimg(jsonstr,sql,type);
}
else{//在后台执行导出
checkerror(jsonstr);
}
}
});
// zys 2011-7-8 添加
if(exportback.checked){
window.close();
}[/align]
在一个页面中 是dojo.xhrPost中的代码执行完成后再执行下面的 window.close();
吗?这2块代码是如何执行的一个过程?
你可以把window.close()的操作放到回调中去执行呀。
如果把window.close放到回调中执行的话,那直到执行完了,页面才能关闭了啊。。我这样执行的话,即使页面关闭了,是不是dojo.xhrPost中的代码也可以全都执行完?