1

I am having trouble opening back up a specific tab after submitting a form. I am using Twitter Bootstrap 2.1.0. Basically, when the from is submitted, it will go back to the first tab instead of the tab where the form was submitted. Here is my code:

<ul class="nav nav-tabs" id="myTab">
  <li class="active"><a href="#tab1">Tab 1</a></li>
  <li><a href="#formtab">Form Tab</a></li>
</ul>

<div class="tab-content">
  <div class="tab-pane active fade in" id="tab1">
    Content goes in here
  </div>

  <div class="tab-pane fade in" id="formtab">  
    <form action="http://myurl.com#formtab" class="center active" method="post">   
      form stuff goes in here
    </form>
  </div>

<div>

I figured that adding the #id at the end of the link would make the browser open up that specific tab but it goes back to the tab1 tab. Any help would be appreciated. Thanks

isherwood
  • 58,414
  • 16
  • 114
  • 157
Chase552
  • 59
  • 3
  • 8

0 Answers0