javascript - jquery: the parent modal dialog textbox is not editable -
jquery ui.dialog after open modal dialog, if open modal dialog again , close it, textbox lock in parent dialog. can not resolve problem. if open non-modal dialog , works fine, parent dialog can closed ,how resolve , , waiting online
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 second dialog!", bgiframe: true, modal: true, resizable: false, buttons: { 'cancel': function() { $(this).dialog('close'); }, 'ok': function() { $(this).dialog('close'); } } }) //show first modal dialog $("#btndlg").click(function() { $("#dlg1").dialog("open"); }) //show second modal dialog $("#btnshowdlg").click(function() { $("#dlg1").dialog("options", "hide",true); $("# dlg2").dialog("open"); })
i figured out, in case sb ever needs answer , doesn't find one
one needs change z-index
in css file of #btnshowdlg
(not exactly)# 638746
and fields within modal preview editable.. no need change else :)
just go css file, locate #btnshowdlg
, either change or set z-index:638746;
Comments
Post a Comment