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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:39:37+00:00 2026-06-11T05:39:37+00:00

Below is the truncated code for an Ajax TabContainer I’m using for my web

  • 0

Below is the “truncated” code for an Ajax TabContainer I’m using for my web page. I need to find the tab index for the container in a JavaScript function, however I continue to get the error message “Microsoft JScript runtime error: Object expected” when this line of code is called in the JavaScript:

        function doValidate() {
            var tabIndex = $('#tabs_header span.ajax_tab_active').index()

If I comment out the “var tabIndex…” part I do not get the error, so I’m wondering if someone can tell me what is going on here. Below is the code for the tabContainer. I’ve “truncated” because it is a very large form with over 12 text box inputs. Both tabs represent two different methods of doing a search. By clicking on the “Search” button, the doValidate() method is the first action called, before the site even goes into the code behind. Also, I receive the same error message on the same line of code no matter which tab is active.

    <asp:TabContainer ID="AdvOrBasicSearch" runat="server" ActiveTabIndex="0">
    <div id="tabs_header">
        <span id="tab1" class="ajax_tab_active">
        <asp:TabPanel ID="basicSearch" runat="server" HeaderText="Basic Search">.../asp:TabPanel>                

        </span>
        <span id="tab2" class="ajax_tab_active">
        <asp:TabPanel ID="advSearch" runat="server" HeaderText="Advanced Search">...</asp:TabPanel>
        </span>
    </div>
    </asp:TabContainer>
  • 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-11T05:39:39+00:00Added an answer on June 11, 2026 at 5:39 am

    I found the answer to this question very quickly. I needed to create a JS variable that was the the tabContainer itself. Then, I just needed to go inside and grab the _activeTabIndex property value. Below is the altered code

            function doValidate() {
                var tabIndex = $find("AdvOrBasicSearch");
                var i = tabIndex._activeTabIndex; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Below am posting my jsp page. home.jsp <%@taglib uri=/WEB-INF/struts-bean.tld prefix=bean%> <%@taglib uri=/WEB-INF/struts-html.tld prefix=html %>
Using the below code I am unable to show the open/save as file dialog:
Below is code to an inherited ComboBox. The issue is that the ComboBox is
Below is the code from internalRegister method of GCMRegistrar class static void internalRegister(Context context,
below is the code to download a txt file from internet approx 9000 lines
Below is the code from a plugin I use for sitemaps. I would like
Below is my form. Using jQuery I load a <select> element based on value
Below code not work, but it's work fine for jsf1.2. Now the framework is
I use Php memcache on PHP Version 5.2.4-2ubuntu5.10 Below you can find the info
I need to backup (using C#) a SQL 2005 Database to a *.bak file.

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.