簡體   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