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

  • Home
  • SEARCH
  • 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 8588695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:51:58+00:00 2026-06-11T22:51:58+00:00

I am not sure if this is a html or javascript tech. I want

  • 0

I am not sure if this is a html or javascript tech.
I want to achieve like that, only show two select boxes,
once I clicked India, another select box will shows only Indiacities options name="listtwo" id="listtwo", if clicked US, shows us cities options.
Could someone please give an example. Many thanks

India
US
Germany

    <select name="listtwo" id="listtwo">
        <option value="Indiacity1">Indiacity1</option>
        <option value="Indiacity2">Indiacity1</option>
        <option value="Indiacity3">Indiacity1</option>
    </select>

  <select name="list3" id="list3">
        <option value="Germany1">Germany1</option>
        <option value="Germany2">Germany1</option>
        <option value="Germany3">Germany1</option>
    </select>

<select name="list4" id="list4">
        <option value="US1">US1</option>
        <option value="US2">US1</option>
        <option value="US3">US1</option>
    </select>​
  • 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-11T22:52:00+00:00Added an answer on June 11, 2026 at 10:52 pm

    HTML:

    <select id="country-select">
        <option>--- Select One ---</option>
        <option value="us">US</option>
        <option value="germany">Germany</option>
    </select>
    
    <select id="us-select" class="sub-menu hide">
        <option value="austin">Austin</option>
    </select>
    
    <select id="germany-select" class="sub-menu hide">
        <option value="berlin">Berlin</option>
    </select>​
    

    CSS:

    .hide {
        display: none;            
    }​
    

    jQuery:

    $('#country-select').change(function (e) {
        $('.sub-menu').hide();
        var selectedCountry = $(this).val();
        if (selectedCountry) {
            $('#' + selectedCountry + '-select').show();
        }       
    });​
    

    And the Fiddle for anyone to check out: http://jsfiddle.net/RPWPZ/3/

    Of course you would have to add all the items for India, and any other countries you’ll be caring about.

    Edit: if you want a country selected when the page loads, look at the changes in this Fiddle: http://jsfiddle.net/RPWPZ/5/

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

Sidebar

Related Questions

not sure why I find this so difficult. Here is the html code: <tr>
Not sure if I've just missed something but this doesn't work: $(this).children('td.threadtitle a').html('thread title');
I'm not entirely sure what's breaking here on this page: http://grandoaks.org/floor.html but it seems
Not sure this is possible, but looking to write a script that would return
Not sure if this is posible or not, but I'm trying to use JavaScript
Being a newbie to Javascript and jQuery, I am not sure whether this is
I'm not sure if this is possible but I would like to retrieve some
I am not sure why this is not firing and I didnt want to
I'm not sure why this is happening. I have a string array that should
I'm not sure if this can be done in javascript without any server. Basically,

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.