【发布时间】:2015-05-08 02:44:32
【问题描述】:
我正在尝试从另一个对话框(子)中关闭一个对话框(父),该对话框是在父对话框关闭按钮“X”上打开的。
我可以通过单击父对话框关闭按钮“X”事件将确认框(带有是、否按钮)显示为子对话框。
当用户单击子对话框的“是”按钮时,我面临关闭父对话框的困难。
这是我的代码:
ParentDialog = function () {
$("#fullscreen").dialog({
title: "Simple Step Wizard",
position: ["left", "top"],
width: "100%",
height: $(window).height(),
zIndex: 1000,
modal: true,
open: function (event, ui) {$("#left-panel").hide();},
close: function (event, ui) {
ChildDialog();
}
});
}
子对话框:
ChildDialog = function () {
$("#Confirm").dialog({
modal: true,
title: 'Please Confirm',
zIndex: 10000,
autoOpen: true,
width: 'auto',
resizable: false,
buttons: {
Yes: function () {
$(this).dialog("close");
//ParentDialog.Close() ??
},
No: function () {
$(this).dialog("close");
}
},
close: function (event, ui) {
//$(this).remove();
}
});
}
【问题讨论】:
-
正确缩进代码
标签: jquery html twitter-bootstrap jquery-dialog