我有一个父jsp页面,我在其中对我的后端数据执行所有操作后端
我在父页面上有一个按钮,如果我进行点击操作,那么它将打开一个包含输入字段表的新对话框
打开此对话框时,我需要使我的父页面不可编辑
这是我的javascript:
function addscenario() {
$( "#addscenariodiv" ).dialog({ dialogClass: 'no-close' });
dialog = $("#addscenariodiv").dialog({
autoOpen : false,
height : 100,
width : 700,
modal : true,
buttons : {
close : function() {
form[0].reset();
allFields.removeClass("ui-state-error");
}
}
});
dialog.dialog("open");
}
答案 0 :(得分:0)
我知道,您已经在使用modal
对话框了。您的控制台中可能没有错误。无论如何,我在this链接中摆弄了一个示例。希望你也可以在那里弄清楚你的解决方案。
<button id="dialogButton" >Open Dialog</button>
<div id="dialog-message" title="Important information" style="display: none;> .... </div>
这是默认隐藏的div。单击按钮,div dialog-message
中的内容将呈现为模式对话框。
$("#dialogButton").click(function(){
$("#dialog-message").show();
$("#dialog-message").dialog({
modal: true,
draggable: false,
resizable: false,
position: ['center', 'top'],
show: 'blind',
hide: 'blind',
width: 400,
dialogClass: 'ui-dialog-osx',
buttons: {
"I've read and understand this": function() {
$(this).dialog("close");
}
}
});
});