[英]Open a jQuery Modal Dialog when another closes
I open a jQuery Modal Dialog.我打开一个 jQuery 模态对话框。 I open a second Modal Dialog after the first one closes.
我在第一个模式对话框关闭后打开第二个模式对话框。 When the second one closes I cannot interact with my page any more.
当第二个关闭时,我无法再与我的页面进行交互。 Seems that there is some modal dialog still alive.
似乎有一些模态对话框仍然存在。 Can someone help?
有人可以帮忙吗? Thanks
谢谢
function modalFirst_Set() {
$('#modalFirst').dialog({
autoOpen: false,
dialogClass: 'DynamicDialogStyle',
resizable: true,
draggable: true,
modal: true,
width: 400,
height: 120,
title: "My First Modal",
open: function (type, data) {
var Page = 'PageFirst.aspx';
$('#modalFirst').load(Page);
},
close: function (event, ui) {
var retValue = $('#modalFirst_RetValue').val();
if (retValue=='X')
modalSecond_Show();
$(this).dialog('destroy');
modalFirst_Set();
}
});
}
function modalSecond_Set() {
$('#modalSecond').dialog({
autoOpen: false,
dialogClass: 'DynamicDialogStyle',
resizable: true,
draggable: true,
modal: true,
width: 400,
height: 120,
title: "My Second Modal",
open: function (type, data) {
var Page = 'PageSecond.aspx';
$('#modalFirst').load(Page);
},
close: function (event, ui) {
$(this).dialog('destroy');
modalSecond_Set();
}
});
}
No problem with this code.这段代码没有问题。 The problem was inside the pageSecond.aspx file.
问题出在 pageSecond.aspx 文件中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.