87,909
社区成员
发帖
与我相关
我的任务
分享
function checkFile(id){
var flag = false;
var data = {
'operate': "checkPropFile"
}
$.ajaxFileUpload({
url: uploadActionRoot+"f6427.do?"+$.param(data),
secureuri: false,
fileElementId: id,
dataType: 'json',
async: false,
success: function (data, status){
alert("haha");
var retmsg = $.trim(data.msg);
if(''!=retmsg){
showDialog(retmsg, 0);
flag=true;
}
} ,
error: function (data, status, e)
{
alert("error: "+e);
}
});
alert("wait");
return flag;
}
function checkFile(id,okfun){
//.....
//...
success:function(){
if(''!=retmsg){
showDialog(retmsg, 0);
okfun()///////////
}
}
//......
}
原来是这样的
var rst=checkFile('id');
if(rst){
//........
}
改成
function okfun(){
//........
}
var rst=checkFile('id',okfun);