繁体   English   中英

使父页面不可编辑

[英]Make the parent page non editable

我有一个父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");
}

我知道,您已经在使用modal对话框。 您的控制台中可能没有几个错误。 无论如何,我在链接中摆弄了一个示例。 希望您也可以在那里提出解决方案。

<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");
        }
    }
});
});

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM