Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9197457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:04:38+00:00 2026-06-17T22:04:38+00:00

I have some jQuery UI tabs in ASP.NET web form. Everything works OK, but

  • 0

I have some jQuery UI tabs in ASP.NET web form. Everything works OK, but by default the first tab is opening.

I am executing some code in a modal popup and when the user clicks the action button, I want the postback to be in the tab from which the popup was triggered.

This is the jQuery UI tabs code:

<ul>
    <li><a href="#tabs-1">Tab1</a></li>
    <li><a href="#tabs-2">Tab2</a></li>
    <li><a href="#tabs-3">Tab3</a></li>
</ul>
<div id="tabs-1">   
</div>
<div id="tabs-2">           
</div>
<div id="tabs-3">  
</div>

I want to know how can I select which tab to be opened by default when page is loaded, for example if I have in the query string:

mypage.aspx?tab=1 or mypage.aspx?tab=2

Some other example might work better.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:04:38+00:00Added an answer on June 17, 2026 at 10:04 pm

    Use the getParameterByName function from this question to get the value:

    function getParameterByName(name)
    {
      name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
      var regexS = "[\\?&]" + name + "=([^&#]*)";
      var regex = new RegExp(regexS);
      var results = regex.exec(window.location.search);
      if(results == null)
        return "";
      else
        return decodeURIComponent(results[1].replace(/\+/g, " "));
    }
    

    Then do something like this:

    $("#tabs").tabs({
        create: function(event, ui){
           var index = parseInt(getParameterByName("tab"));
           $(this).tabs("option", "active", index);
        }
    }); 
    

    Links:

    • http://api.jqueryui.com/tabs/#option-active
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net page with some JQuery tabs. Everything works ok. I added
I have some tabs using jQuery UI which work just fine, but I want
I have JQuery tabs in my view. Each tab contain a partial view. Some
Suppose i have some tabs (e.g. jquery tab) and I want to dynamically load
I'm doing my first project with jquery: My site will have some tabs: 1.
I have some jQuery tabs on a website and I am trying to make
I have some jQuery/JS below. The first thing to run is the alert box
I have setup some tabbed navigation on my ASP.NET Masterpage. It is pretty basic:
I have some jQuery tabs one of which holds a flash video. When I
I have some jquery tabs on my page the code for them is: //tabs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.