1

For example, I have tabulators (bootstrap, tabpanel) which changes the url, adding #tab1, #tab2, ... as Im clicking on them. Lets say I do a submit from #tab1, and want to jump to #tab2, how to do that? All I have is:

.
.
.
$(formObj).submit();
return false;

the action of form is empty (<form method="post">)

John Smith
  • 6,129
  • 12
  • 68
  • 123
  • 1
    See if any of [these answers](http://stackoverflow.com/questions/503093/how-can-i-make-a-redirect-page-using-jquery) help. – Mark C. Apr 15 '15 at 13:19

1 Answers1

1

You could use the .tab("show") function, as specified in the Bootstrap documentation, to show the tab that you want after the form submission.

For example, if your form is in #tab1 and you want to move to #tab2 after the form is submitted, you could do it like this (change #myTabs for the id of the tab list that you are using):

$(formObj).submit();
$('#myTabs a[href="#tab2"]').tab('show')
return false;
Alvaro Montoro
  • 28,081
  • 7
  • 57
  • 86