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