jquery the parent dialog textbox is locked after open dialog again -


i open modal dialog twice, textbox locked in first dialog(parent dialog) after second dialog closed why? how resolve problem? new user,so can't post image answer appreciated, thank you

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 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");             }) 

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; 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -