簡體   English   中英

單擊另一個jQuery UI模式對話框時,將其關閉

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM