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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:30:15+00:00 2026-05-15T04:30:15+00:00

I have 2 select options. I want to change the drop down options in

  • 0

I have 2 select options. I want to change the drop down options in second select options based on what I select in first select options. How do I do that in jquery?

<select id="Manage">
   <option value="a">A</option>
   <option value="b">B</option>
   <option value="c">C</option>
<select>

Second select option if A is selected from first select option

<select id='selectA'>
   <option value="1">1</option>
   <option value="2">2</option>
</select>

Now if B is selected from first select option

<select id='selectA'>
   <option value="3">3</option>
   <option value="4">4</option> 
</select>
  • 1 1 Answer
  • 1 View
  • 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-15T04:30:16+00:00Added an answer on May 15, 2026 at 4:30 am

    Something like:

    $('#Manage').change(function() {
        var options = '';
        if($(this).val() == 'a') {
            options = '<option value="1">1</option><option value="2">2</option>';
        }
        else if ($(this).val() == 'b'){
            options = '<option value="3">3</option><option value="4">4</option>';
        }
    
        $('#selectA').html(options);
    });
    

    Of course you can have your options e.g. stored in an array and combine them on fly or whatever, that is up to you.

    Reference: .change(), .val()

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

Sidebar

Related Questions

I have the following drop down: <select name=chooseLanguage> <option>Choose One</option> <option value=java>Java</option> <option value=php>PHP</option>
I have a drop-down list as, <select id='idleReason' onChange=loadXMLDoc(this.value) size=1> <option value=nothing selected=selected>Select a
I have writen options to a <select> using something like Id.innerHTML = <option value='foo'>Foo</option>;
I have the following jquery code: jQuery(function(){ jQuery(select#rooms).change(function(){ var options = ''; jQuery.getJSON(/admin/selection.php,{id: jQuery(this).val(),
I have a drop-down list of colors, and when selected, i want to change
I have 2 drop down lists , and value of the second drop down
I have a drop down that I select a file type from, I then
So, basically I have this select / drop down menu that I use AJAX
I have a drop down selection box and using jQuery if statements i want
I have two drop down. SelCurrentManuf and selCurrentModel. I want the option in selCurrentModel

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.