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 6942773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:04:07+00:00 2026-05-27T13:04:07+00:00

The API says you can’t disable the active tab which I think is the

  • 0

The API says you can’t disable the active tab which I think is the crux of my problem.

I have six tabs in one UI Tab. One of the tabs is sometimes empty after an ajax call to fill all the tabs with data based on a user’s click of a new UI Accordion selection. I use the “zero” tab as the default selected tab whenever the user makes a new selection.

I use the following to code in the php file that loads the sometimes empty tab to disable the tab when it’s empty. It works fine unless the user has this tab selected when clicking a new UI Accordion selection. In only that case, the empty tab will remain enabled.

?>
    <script type="text/javascript">
      $(document).ready(function() {
          $( "#tabs" ).tabs( "option", "disabled", false);
      });
    </script>
<?php
}else{ 
?>
    <script type="text/javascript">
      $(document).ready(function() {
          $( "#tabs" ).tabs( "option", "disabled", [2]);
      });
    </script>

Can someone suggest a stragegy?

Here is the script containing the ajax calls:

<script type="text/javascript">                
    $('.stallion').live('click', function(){
 var id = parseInt(this.id);  // Get stallion_ID from clicked "a" tag id.
 activestallion(id);  // Function to indicate clicked Stallion in Stallion Accordion
        // Start loading Overview Tab
        var request = $.ajax({
            url: "stalliondetails.php",
            type: "GET",
            data: {stallion_ID : id}
        });
        request.done( function(html){
            $("#tabs-1").html(html);
            $( "#tabs" ).tabs( "option", "selected", 0 );
            $(".activehorse").fadeOut('1000', function(){
            document.getElementById("activehorsename").innerHTML
                 =document.getElementById(id).innerHTML;
            $(".activehorse").fadeIn('1000');
            });
            $("#tabs").tabs( "select" , 0 );
        });
        // Overview Tab load finished.
        //Pedigree Tab load starting.
        var request = $.ajax({
        url: "pedigreedetails.php",
        type: "GET",
        data: {stallion_ID : id},
        success: function(html){
        $("#tabs-2").html(html);
        }
        });    
        //Pedigree Tab load finished.
        //Progeny Tab load starting.
        var request = $.ajax({
        url: "progenydetails.php",
        type: "GET",
        data: {stallion_ID : id},
        success: function(html){
        $("#tabs-3").html(html);
        }
        });    
        //Progeny Tab load finished.
        //News Tab load starting.
        var request = $.ajax({
        url: "newsdetails.php",
        type: "GET",
        data: {stallion_ID : id},
        success: function(html){
        $("#tabs-4").html(html);
        }
        });    
        //News Tab load finished.
        //Race Record Tab load starting.
        var request = $.ajax({
        url: "racerecorddetails.php",
        type: "GET",
        data: {stallion_ID : id},
        success: function(html){
        $("#tabs-5").html(html);
        }
        });    
        //Race Record Tab load finished.
        //Analysis Tab load starting.
        var request = $.ajax({
        url: "analysisdetails.php",
        type: "GET",
        data: {stallion_ID : id},
        success: function(html){
        $("#tabs-6").html(html);
        }
        });    
        //Analysis Tab load finished.
        //Update the Seasons Request form to this Stallion.
        updateseasons(id);
        $( "#tabs" ).tabs( "option", "selected", 0 );
        $("button").button() ;       
  });
</script>

Thanks for any help.

  • 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-05-27T13:04:08+00:00Added an answer on May 27, 2026 at 1:04 pm

    Try

    <script type="text/javascript">
      $(document).ready(function() {
          $( "#tabs" ).tabs( "option", "disabled", 2);
      });
    </script>
    

    or multi-disable

     <script type="text/javascript">
      $(document).ready(function() {
          $( "#tabs" ).tabs('option','disabled', [1, 2, 3, 4]);
      });
    </script>
    

    instead of

    <script type="text/javascript">
      $(document).ready(function() {
          $( "#tabs" ).tabs( "option", "disabled", [2]);
      });
    </script>
    

    to enable tab and move to use

      $( "#tabs" ).tabs( "enable" , 1 )
      $( "#tabs" ).tabs( "select" , 1 )
    

    *counting starts from 0

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The API says that the Alert Dialog can have one, two or three buttons,
The answer to this SO question says that you can create an api by
I'm trying to understand a line from the Google Datastore API which says: JDO
I was reading the static maps API, and it says you can include a
google's documentation says the google maps javascript api can be used to access the
Twitter API documentation says that I can get only 20 last messages ( proof
What API or tools can I use to query the capabilities of the system
Using the Windows API, how can I get a list of domains on my
from facebook docs it says: You can post a score or a user by
I've looked at Google's map API, which is all javascript and terribly slow on

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.