troubleshooting Question

stay in same tab after postback

Avatar of zachvaldez
zachvaldezFlag for United States of America asked on
10 Comments1 Solution1040 ViewsLast Modified:
When I select the save button in tab 2 , the focus does not stay in tab 2 but instead it jumps back to tab 1.
Here's the code..
<div id="myTabs">
            <ul class="nav nav-tabs tabs" id="thistab" runat="server">

                <li class="tab-link current" data-tab="tab1" id="tab11" data-toggle="tab" title="Person" onclick="return setText('lblSelect',this.title);"><a href="#tab1">Person</a></li>

                <li class="tab-link" data-tab="tab-6" id="tab6" data-toggle="tab"><a href="#tab6" onclick="return setText('lblSelect',this.title);" runat="server" title="Employee">Information</a></li>
                <li class="tab-link" data-tab="tab-2" id="tab2" data-toggle="tab"><a href="#tab2" onclick="return setText('lblSelect',this.title);" title="Assignment">Assignment History</a></li>
                <li class="tab-link" data-tab="tab-3" id="tab3" data-toggle="tab"><a href="#tab3" onclick="return setText('lblSelect',this.title);" title="Issues">Issues</a>
                    <ul class="tabs show-on-hover" id="ulIssue">

                        <li class="tab-link" data-tab="tab-8" id="tabs-8"><a href="#tabs-8" title="New Issue" onclick="addlocation('RedIssue.aspx')">New Issue</a>


                <li class="tab-link" data-tab="tab-4" id="tab4" data-toggle="tab"><a href="#tab4" onclick="return setText('lblSelect',this.title);" title="PPC">PPC</a></li>
                <li class="tab-link" data-tab="tab-5" id="tab5" data-toggle="tab"><a href="#tab5" onclick="return setText('lblSelect',this.title);" title="Comments">Comments</a></li>
                <li class="tab-link" data-tab="tab-7" id="tab7" data-toggle="tab"><a href="#tab7" onclick="return setText('lblSelect',this.title);" title="Attachments">Attachments</a></li>


<div class="tab-content current" id="tab-1"...</div>
<div class="tab-content" id="tab-2"...
  <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="small button right" OnClick="btnSave_Click" />

<div class="tab-content" id="tab-3"...</div>
<div class="tab-content" id="tab-4"...</div>
<div class="tab-content" id="tab-5"...</div>
<div class="tab-content" id="tab-6"...</div>

Open in new window

Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros