2010-12-01 6 views
0

モーダルダイアログを2回開く 2番目のダイアログが閉じられた後、最初のダイアログ(親ダイアログ)にテキストボックスがロックされる なぜですか?どのように問題を解決する?私は新しいユーザーだので、私は、任意の答えは理解されるであろう画像 を投稿することができない、あなたに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

答えて

0

はいdivIdはあなたが作ってみることができますモーダル:false。それは...

おかげ

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; 
関連する問題