2
我正在使用ExtJS 3.4。我有一個長時間運行的異步進程,需要等待完成。它適用於Firefox,但Internet Explorer不會等待。我該如何解決這個問題?ExtJS Ajax請求超時不影響Internet Explorer
這裏是我的客戶端代碼:
function SaveUser(form, myDataObject, url) {
if (form.isValid()) {
StatusMessage.show('Please wait. New User Registrations may take up to one minute to complete.');
Ext.Ajax.request(
{
url: url,
method: 'POST',
timeout: 30000,
params: myDataObject,
success: function (result, request) {
StatusMessage.hide();
formSubmit = Ext.util.JSON.decode(result.responseText);
if (!formSubmit.success) {
Ext.Msg.show({
title: 'Error',
msg: formSubmit.msg,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.WARNING,
minWidth: 390,
maxWidth: 390,
closable: false
});
} else {
ShowRegistered();
}
},
failure: function (result, request) {
StatusMessage.hide();
ShowServerError(result);
}
});
} else {
ShowValidationErrors();
}
}
這裏是我的服務器端代碼:
CreateUserInActiveDirectory(user);
//Internet Explorer Time Out immediately instead of waiting here
System.Threading.Thread.Sleep(20000);
AuthenticateUser(user);
謝謝。我討厭Internet Explorer。 –