[英]closing one jQuery UI modal dialog when another one clicked
当用户想要登录该网站时,他们单击登录链接,然后在模式对话框中显示登录表单。
如果用户忘记了密码,则登录表单内还有一个忘记密码的链接。
忘记密码的形式也显示在模式对话框中。
我的问题是,当用户从登录模式对话框中单击“忘记密码”链接时,另一个模态对话框(“忘记密码”)在现有登录模式对话框的顶部打开。
忘记密码模式对话框打开时,可以关闭表单模式对话框吗?
谢谢!
<div id="dialog_form_signin" class="hidden" title="<%=lngSigninForm%>">
<form action="content/myaccount/index.cs.asp?Process=SignIn" method="post" class="signin-form">
<fieldset>
<p>
<label><%=lngEmailAdd%></label>
<input type="text" name="EMAILADDRESS" size="55" value="" />
<small></small>
</p>
<p>
<label><%=lngPassword%></label>
<input type="password" name="PASSWORD" size="55" value="" />
<small></small>
</p>
<p>
<input type="hidden" name="x" value="p">
<input type="submit" name="signin" value="<%=lngSubmit%>" class="submit" />
</p>
<p><a href="javascript:void(0)" id="open_forgotpass" class="reset"><img id="message" src="images/icons/help.png" alt="Message"> <%=lngPassRemind%></a></p>
</fieldset>
</form>
</div>
$( "#dialog_form_forgotpass" ).dialog({
autoOpen: false,
width: 400,
modal: true
});
$("#open_forgotpass").click(function(){$( "#dialog_form_forgotpass" ).dialog( "open" );});
$( "#dialog_form_signin" ).dialog({
autoOpen: false,
width: 400,
modal: true
});
$("#open_signin").click(function(){$( "#dialog_form_signin" ).dialog( "open" );});
单击“忘记密码”,关闭登录对话框,然后打开“忘记密码”对话框
$("#open_forgotpass").click(function(){
$( "#dialog_form_signin" ).dialog( "close" );
$( "#dialog_form_forgotpass" ).dialog( "open" );
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.