我在一个页面中添加了多个更新面板,其中包含多个按钮,但是继续按钮工作和后退按钮不起作用...我在下面添加我的代码.. [英] I add multiple Update panel in a page with multiple button but continue button work and back button does not work...I add my code below ..

查看:49
本文介绍了我在一个页面中添加了多个更新面板,其中包含多个按钮,但是继续按钮工作和后退按钮不起作用...我在下面添加我的代码..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$(document).ready(function () {

           $(document.getElementById('<%=move_step2.ClientID%>')).click(function () {
                     $('#step2_body').show('slow');
                     $('#step1_body').hide('slow');
                     // alert('a');

                 })

                 $(document.getElementById('<%=move_step3.ClientID%>')).click(function () {
                     // alert("0");
                     $('#step3_body').show('slow');
                     $('#step2_body').hide('slow');
                     // alert('a');

                 })

                 $(document.getElementById('<%=move_step4.ClientID%>')).click(function () {
                     // alert("0");
                     $('#step4_body').show('slow');
                     $('#step3_body').hide('slow');
                     // alert('a');

                 })

                 $(document.getElementById('<%=move_step5.ClientID%>')).click(function () {
                     //alert("0");
                     $('#step5_body').show('slow');
                     $('#step4_body').hide('slow');
                     // alert('a');

                 })

                 $(document.getElementById('<%=move_step6.ClientID%>')).click(function () {
                     alert("0");
                     $('#step6_body').show('slow');
                     $('#step5_body').hide('slow');
                     // alert('a');

                 })

           $(document.getElementById('<%=back_step1.ClientID%>')).click(function () {
               alert('a');
                     $('#step1_body').show('slow');
                     $('#step2_body').hide('slow');
                     // alert('a');

                 })

           $(document.getElementById('<%=back_step2.ClientID%>')).click(function () {
               alert('a');
                     $('#step2_body').show('slow');
                     $('#step3_body').hide('slow');
                     // alert('a');

                 })

           $(document.getElementById('<%=back_step3.ClientID%>')).click(function () {
               alert('a');
                     $('#step3_body').show('slow');
                     $('#step4_body').hide('slow');
                     // alert('a');

                 })

           $(document.getElementById('<%=back_step4.ClientID%>')).click(function () {
               alert('a');
                     $('#step4_body').show('slow');
                     $('#step5_body').hide('slow');
                     // alert('a');

                 })

           $(document.getElementById('<%=back_step5.ClientID%>')).click(function () {
               alert('a');
                     $('#step5_body').show('slow');
                     $('#step6_body').hide('slow');
                     // alert('a');

                 })

             });

 <h3>Checkout</h3>
                <div class="checkout-tab">
                    <h2><span class="label label-important">1</span> Billing address</h2>
                    <div class="chechout-content" id="step1_body">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                            <contenttemplate>
                                

                               
                                <div class="row-fluid clearfix clearfix">
                                    <div class="span2">
                                        <label>Fax number: </label>
                                    </div>
                                    <div class="span9">
                                        <input type="text" class="span4">
                                    </div>
                                </div>
                                <!--<button class="btn btn-danger">«Back</button>-->
                                  
                        <%--<a class="btn" id="move_step2">Continue</a>--%>
                                <asp:Button class="btn" ID="move_step2" runat="server" Text="Continue" />
                            </contenttemplate>
                            <triggers>
                                <asp:AsyncPostBackTrigger ControlID="move_step2" />
                            </triggers>
                        


                    </div>
                </div>

                <div class="checkout-tab" id="step2">
                    <h2 id="step2_heading"><span class="label label-important">2</span> Shipping address</h2>

                    <div class="chechout-removed" id="step2_body" style="display: none;">
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                            <contenttemplate>
                                <p>Select a shipping address from your address book or enter a new address. </p>
                               
                               
                                <div class="row-fluid clearfix clearfix">
                                    <div class="span2">
                                        <label>Fax number: </label>
                                    </div>
                                    <div class="span9">
                                        <input type="text" class="span4">
                                    </div>
                                </div>
                                <asp:Button ID="back_step1" CssClass="btn btn-danger" runat="server" Text="Back" />
                                <%--<button class="btn btn-danger" id="back_step1">«Back</button>--%>
                                  
                                <asp:Button ID="move_step3" CssClass="btn" runat="server" Text="Continue" />

                            </contenttemplate>
                            <triggers>
                                <asp:AsyncPostBackTrigger ControlID="move_step3" />
                                <asp:AsyncPostBackTrigger ControlID="back_step1" />
                            </triggers>
                        
                    </div>

                </div>

                <div class="checkout-tab" id="step3">
                    <h2><span class="label label-important">3</span> Shipping method</h2>

                    <div class="chechout-removed" id="step3_body" style="display: none;">
                        <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">
                            <contenttemplate>
                                <p>Select a shipping address from your address book or enter a new address. </p>
                                <label class="radio">
                                    <input type="radio">
                                    In-Store Pickup ($0.00)<br>
                                    Pick up your items at the store</label>
                                
                                
                                <asp:Button ID="back_step2" runat="server" Text="Back" CssClass="btn btn-danger" />
                                <%--<button class="btn btn-danger" id="back_step2">«Back</button>--%>
                                  
                        <asp:Button CssClass="btn" runat="server" ID="move_step4" Text="Continue" />
                            </br></contenttemplate>
                            <triggers>
                                <asp:AsyncPostBackTrigger ControlID="move_step4" />
                                <asp:AsyncPostBackTrigger ControlID="back_step2" />
                            </triggers>
                        
                    </div>
                </div>

                <div class="checkout-tab" id="step4">
                    <h2><span class="label label-important">4</span> Payment method</h2>

                    <div class="chechout-removed" id="step4_body" style="display: none;">
                        <asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional">
                            <contenttemplate>
                                <label class="radio">
                                    <input type="radio">Cash On Delivery (COD)</label>
                               
                                <asp:Button ID="back_step3" runat="server" Text="Back" CssClass="btn btn-danger" />
                                <%--<button class="btn btn-danger" id="back_step3">«Back</button>--%>  
                        <%--<button class="btn" id="move_step5">Continue »</button>--%>
                                <asp:Button CssClass="btn" runat="server" ID="move_step5" Text="Continue" />
                            </contenttemplate>
                            <triggers>
                                <asp:AsyncPostBackTrigger ControlID="move_step5" />
                                <asp:AsyncPostBackTrigger ControlID="back_step3" />
                            </triggers>
                        
                    </div>
                </div>

                <div class="checkout-tab" id="step5">
                    <h2><span class="label label-important">5</span> Payment information</h2>

                    <div class="chechout-removed" id="step5_body" style="display: none;">
                        <asp:UpdatePanel ID="UpdatePanel5" runat="server" UpdateMode="Conditional">
                            <contenttemplate>
                                <p>
                                    In cases where an order is placed, an authorized representative will contact you, personally or over telephone, to confirm the order.
After the order is confirmed, it will be processed.
Orders once confirmed, cannot be cancelled.
                                </p>
                                <p>P.S. You can edit this text from admin panel.</p>

                                <div class="card_info">
                                    
                  <div class="row-fluid clearfix clearfix">
                                        <div class="span2">
                                            <label>Card Code: </label>
                                        </div>
                                        <div class="span9">
                                            <input type="text" class="span4">
                                        </div>
                                    </div>
                                    <asp:Button ID="back_step4" runat="server" Text="Back" CssClass="btn btn-danger" />
                                    <%--<button class="btn btn-danger" id="back_step4">«Back</button>--%>
                                      
                            <%--<button class="btn" id="move_step6">Continue »</button>--%>
                                    <asp:Button CssClass="btn" runat="server" ID="move_step6" Text="Continue" />
                            </div></contenttemplate>
                            <triggers>
                                <asp:AsyncPostBackTrigger ControlID="move_step6" />
                                <asp:AsyncPostBackTrigger ControlID="back_step4" />
                            </triggers>
                        
                    </div>
                </div>

                <div class="checkout-tab" id="step6">
                    <h2><span class="label label-important">6</span> Confirm order</h2>
                    <div class="chechout-removed" id="step6_body" style="display: none;">
                        <asp:UpdatePanel ID="UpdatePanel6" runat="server" UpdateMode="Conditional">
                            <contenttemplate>
                                <div class="row-fluid clearfix">
                                    

                                    
                                </div>

                                <div class="row-fluid clearfix">
                                    <table class="table catinfo">
                                        <tr>
                                            <th class="span2"> </th>
                                            <th class="span4">Product(s) </th>
                                            <th class="span2">Price</th>
                                            <th class="span2">Qty</th>
                                            <th class="span2">Total </th>
                                        </tr>
                                        <tr>
                                            <td class="span2">
                                                <img src="assets/img/0000033_best_grilling_recipes_80.jpeg" height="80" width="80"></td>
                                            <td class="span4"><a href="http://demo.nopcommerce.com/best-grilling-recipes">Best Grilling Recipes</a></td>
                                            <td class="span2">$27.00 </td>
                                            <td class="span2">1</td>
                                            <td class="span2">$27.00 </td>
                                        </tr>
                                    </table>


                                    

                                </div>
                                <asp:Button ID="back_step5" runat="server" Text="Back" CssClass="btn btn-danger" />
                                  
                            <asp:Button CssClass="btn" runat="server" ID="btnCreateOrder" Text="Continue" />
                            </contenttemplate>
                            <triggers>
                                <asp:AsyncPostBackTrigger ControlID="btnCreateOrder" />
                                <asp:AsyncPostBackTrigger ControlID="back_step5" />
                            </triggers>
                        
                    </div>
                </div>

推荐答案

(document).ready(function () {
(document).ready(function () {


(document.getElementById('<%=move_step2.ClientID%>')).click(function () {
(document.getElementById('<%=move_step2.ClientID%>')).click(function () {


('#step2_body').show('slow');
('#step2_body').show('slow');


这篇关于我在一个页面中添加了多个更新面板,其中包含多个按钮,但是继续按钮工作和后退按钮不起作用...我在下面添加我的代码..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆