2010-12-01 56 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;