2010-12-01 169 views
0

我打开两次模态对话框, 第二个对话框关闭后,文本框被锁定在第一个对话框(父对话框) 为什么?如何解决问题?我是新用户,所以我不能发表任何答案可以理解的图像 ,谢谢jquery父对话框文本框被锁定后再次打开对话框

HTML:

<XMP> 
<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> 
</XMP> 

的jQuery:

$("#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'); 
        } 
       } 
      }) 

      $("#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'); 
        } 
       } 
      })    
      $("#btnDlg").click(function() { 
       $("#dlg1").dialog("open"); 
      }) 

      $("#btnShowDlg").click(function() { 
       $("#dlg2").dialog("open"); 
      }) 
+0

没有任何身体碰到了这个问题。 – divid 2010-12-01 06:19:34

回答

0

是DIVID你可以尝试制作莫代尔:假。它会运行

让我知道..

感谢

1
buttons: { 
       "Save": function() { 
        //validate 
        if (typeof (Page_ClientValidate) == 'function') { 
         Page_ClientValidate(newValGroup); 
        } 
        if (Page_IsValid) { 
         gettHTML(divID, PriceID); 
        } 
       }, 
       Cancel: function() { 
        $(this).dialog("close"); 
       } 
      }, 
      close: function (ev, ui) { 
       $(this).dialog("destroy"); 
      } 

     }); 
     $("#" + divID).dialog('open'); 
     return false;