0
親愛Friends.i我在關閉我的window.I調用Ajax調用這樣ExtJS的窗口等待
function callPreviewWindow(){
$.ajax({
type : "GET",
url : "/ajax/eform/preview.do",
cache : false,
dataType : "text/html",
timeout: 40000,
beforeSend : function() {
showWaitingDialog("Please wait...");
},
error: function (xhr, err)
{
resolveAjaxError(xhr, err);
},
success : function(data) {
showPreviewWindow(data);
}
});
}
面臨的一個問題對話閉幕問題,但是這個AJAX調用執行花費更多的時間,以便增加超時到40000.它工作正常,並顯示以下窗口。
function showPreviewWindow(htmlData){
var previewWindow = new Ext.Window({
title: "E-Form View",
width:650,
id:'previewWindow',
autoHeight: true,
html: htmlData,
modal: true,
y: 150,
listeners: {
beforeclose: function() {
searchVisible = false;
}
},
buttons: [
{
text: 'Close', handler: function() {
previewWindow.close();
}
}
]
});
previewWindow.show(this);
}
但問題是,當點擊關閉按鈕,我能關閉該窗口。但是showWaitingDialog(我在ajax調用函數中發送事件之前調用的)沒有關閉。
請幫我關閉這也關閉按鈕單擊。
在此先感謝。 Sathya