2010-12-01 55 views
0

jquery ui.dialog 打開模式對話框後,如果我再打開另一個模式對話框並關閉它,文本框鎖定在父對話框中。我無法解決這個問題。 如果我打開一個無模式對話框,它工作正常, 但父對話框可以關閉,如何解決它,謝謝,在線等待jquery:父模式對話框文本框不可編輯

HTML:(DOTNET MVC2)

<input id="btnDlg" type="button" value="open dialog"/> 
<div id="dlg1"><%=Html.TextBox("txtName","can not edit") %><input id="btnShowDlg" type="button" value="dialog again" /></div> 
<div id="dlg2"><div>the second dialog</div><%=Html.TextBox("txtName2") %></div> 

的jQuery :

//first modal dialog 
$("#dlg1").dialog({ 
       autoOpen: false, 
       height: 350, 
       width: 300, 
       title: "The first dialog!", 
       bgiframe: true, 
       modal: true, 
       resizable: false, 
       buttons: { 
        'Cancel': function() { 
         $(this).dialog('close'); 
        }, 
        'OK': function() { 
         $(this).dialog('close'); 
        } 
       } 
      }) 
//second modal dialog 
      $("#dlg2").dialog({ 
       autoOpen: false, 
       height: 200, 
       width: 300, 
       title: "This is the second dialog!", 
       bgiframe: true, 
       modal: true, 
       resizable: false, 
       buttons: { 
        'Cancel': function() { 
         $(this).dialog('close'); 
        }, 
        'OK': function() { 
         $(this).dialog('close'); 
        } 
       } 
      }) 
//show the first modal dialog 
      $("#btnDlg").click(function() { 
       $("#dlg1").dialog("open"); 
      }) 
    //show the second modal dialog 
       $("#btnShowDlg").click(function() { 
        $("#dlg1").dialog("options", "hide",true); 
        $("# 

dlg2").dialog("open"); 
      }) 
+0

@divid,鎖的意思是,它是否被禁用? – kobe 2010-12-01 05:36:17

回答

2

我想通了,以防萬一某人曾經需要一個答案,並沒有找到一個

人們需要改變z-index#btnShowDlg CSS文件,這(不完全)#638746,然後在預覽模式中的字段可編輯。沒有必要改變任何東西:)

只要到你的CSS文件,找到#btnShowDlg,要麼改變或設置z-index:638746;