使用YUI訪問后臺,返回之后將提示alert到前臺,但是前臺IE頁面的進度不結束。
var callback={
upload:function(res) {
var tax = [];
tax = YAHOO.lang.JSON.parse(res.responseText);
if(tax.data[0].checkResult=="1") {
progressBar.hide();
errorMessage('******');
}
}
}
YAHOO.util.Connect.setForm("fm",true);
var url = contextRootPath+"/policyImport/policyImportEdit.do";
var transaction = YAHOO.util.Connect.asyncRequest('POST',url, callback,null);
upload:function(res) {
var tax = [];
tax = YAHOO.lang.JSON.parse(res.responseText);
if(tax.data[0].checkResult=="1") {
progressBar.hide();
errorMessage('******');
}
}
}
YAHOO.util.Connect.setForm("fm",true);
var url = contextRootPath+"/policyImport/policyImportEdit.do";
var transaction = YAHOO.util.Connect.asyncRequest('POST',url, callback,null);
但是如果在返回的結果中使用window.location.href跳轉當前頁面,及可以解決,但是我不想重新跳轉,請問有其他解決方案嗎?
回答:
if(tax.data[0].checkResult=="1") {
progressBar.hide();
errorMessage('******');
}
此處不管有沒有 結果返回 都應該 progressBar.hide(); 吧
progressBar.hide();
errorMessage('******');
}
此處不管有沒有 結果返回 都應該 progressBar.hide(); 吧