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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:33:38+00:00 2026-05-26T18:33:38+00:00

I want to ask quick question, i want to make a select drop down

  • 0

I want to ask quick question, i want to make a select drop down that when i choose one of the options the values of the other select drop down change …

let’s say i have select drop down called model that has the following

- Acura
- Aston martin
- Audi

I want when i choose (let’s say ) Audi, in the type select drop down i find Audi type’s only

- A3
- A5
- A4

I don’t want to use AJAX calls, i just want to use javascript or jquery to filter the data

thanks guys

  • 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-26T18:33:39+00:00Added an answer on May 26, 2026 at 6:33 pm

    Like Shomz said,

    Assuming the dropdowns look like this:

        <!-- First dropdown. Make of car -->
        <select name='Manufactor' id='make'>
            <option value='null'>Select a Make</option>
            <option value='Audi'>Audi</option>
            <option value='BMW'>BMW</option>
            <option value='Volvo'>Volvo</option>
        </select>
    
        <br />
    
        <!-- Second dropdown. Model of car -->
        <select name='Model' id='model'>
        </select>
    

    The javascript would look like this:

        <script type='text/javascript'>
    
        var model = ['','audi','bmw','volvo']; //Set makes
        model[1] = ['A3', 'A5', 'A4']; // Set Audi models
        model[2] = ['M3', 'M5', 'M6']; // Set BMW models
        model[3] = ['C30', 'C70'];     // Set Volvo models
    
        var test = model[1][1];
    
        function setModel(index) {
            var modelDropdown = document.getElementById('model');
            modelDropdown.options.length = null;
            for(var i = 0; i < model[index].length; i++) {
                modelDropdown.options[i] = new Option(model[index][i]);
            }
        }
    
        window.onload = function() {
            var makeDropdown = document.getElementById('make');
            makeDropdown.onchange = function() {
                setModel(this.selectedIndex);
            }
        }
    
        </script>
    

    Notice that the Models start at index 1 and not 0, because the first option is a blank Select Model option.

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

Sidebar

Related Questions

Quick question, what's the preferable way to programmaticaly ask Is there exactly one element
i want to ask quick question, is json support arabic characters i mean when
i want ask some question about asp.net mvc Is static constructor will init every
I want to ask how other programmers are producing Dynamic SQL strings for execution
I want to ask a question about how you would approach a simple object-oriented
i want to ask a question about how to do paging in ASP.net coding
I want to ask how to add a computed column in BIRT that compute
I had a quick question regarding RegEx... I have a string that looks something
This question is so basic that I'm almost embarrassed to ask it, but it's
If I can ask that answers refrain from pointing towards frameworks or other libraries,

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.