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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:53:19+00:00 2026-05-30T17:53:19+00:00

I am reseting a combo box based on another combo box. I have 2

  • 0

I am reseting a combo box based on another combo box. I have 2 combo boxes and when i am selecting 01 then second combo is enabled and when I am selecting an option from 2nd combo then a text box appears, and when i am selecting ‘please select’ from first combo then 2nd combo is auto reset(disabled), but why that text box is not disappearing?

When an option except first option is selected from second combo, I am populating a text box like :

$(function() {
    //This hides all initial textboxes
    $('label').hide();
    $('#secondcombo').change(function() {
        //This saves some time by caching the jquery value
        var val = $(this).val();
        //this hides any boxes that the previous selection might have left open
        $('label').hide();
        //This just opens the ones we want based off the selection
        switch (val) {
        case 'option1':
        case 'option4':
        case 'other':
            $('#label1').show();
            break;
        }
    });
    //I'm not really sure why these are here
    $("input").focus(function() {
        $(this).next("span").fadeIn(500);
    }).blur(function() {
        $(this).next("span").fadeOut(1000);
    });
});​

HTML

  <select id='firstcombo'>
   <option value="">please select</option>
   <option value="01">01</option>
   <option value="02">02</option>
  </select>

  <select id='secondcombo' disabled="true">
   <option value="_">- select -</option>
   <option value="option1">data</option>
   <option value="option2">data</option>
  </select>

  <label id="label1" for="option1">
        <input type="text" id="option1" />
  </label>
  • 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-30T17:53:21+00:00Added an answer on May 30, 2026 at 5:53 pm

    This is not hiding because there is no event for your first combo in this code.

    You may use below code to hide this

    <select id='firstcombo' onchange="jQuery('label#label1').hide();">
       <option value="">please select</option>
       <option value="01">01</option>
       <option value="02">02</option>
      </select>
    

    This will work for you.

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

Sidebar

Related Questions

I have two custom widgets (two classes based on QtGui.QWidget). In __init__ of QtGui.QMainWindow
When the user switches to another program and then back again., the original program's
Good day! I have a problem in reseting the contents of my JPANEL. Is
I had asked a question earlier( How to keep this counter from reseting at
In another question it was recommend that I try resetting a remote tracking branch
I have a problem with AutoCompleteBox. I wanted to use it as editable combobox.
my app has a bug, and i believe its because I'm not reseting the
I have a client side application that uses Kerberos authentication to connect to remote
Possible Duplicate: Resetting a multi-stage form with jQuery Once the form submitted, response from
I have the need to check when an iPhone has been factory reset. There

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.