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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:32:51+00:00 2026-05-27T23:32:51+00:00

I have two drop down lists , list1, list 2. I want it to

  • 0

I have two drop down lists , list1, list 2. I want it to change according to the radio button selected by the user.

If the user selects radio button1, lists1 should be displayed.
If the user selects radio button2, lists2 should be displayed.

How can i achieve this using javascript.
Please somebody help me.

  • 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-27T23:32:52+00:00Added an answer on May 27, 2026 at 11:32 pm

    Here my sample, you should modify it as yours:

    <div>
        <input type="radio" name="rdo" id="rdo1" value="list1" />Radio1
        <select id="select1" style='display:none;'>
            <option value="l1">list1-1</option>
            <option value="l2">list1-2</option>
        </select>
    </div>
    <div>
        <input type="radio" name="rdo" id="rdo2" checked="checked" value="list2"/>Radio2
        <select id="select2">
            <option value="l1">list2-1</option>
            <option value="l2">list2-2</option>
        </select>
    </div>
    
    <script>
    function select1() {
        document.getElementById("select1").style.display="block";
        document.getElementById("select2").style.display="none";   
    }
    
    function select2() {
     document.getElementById("select2").style.display="block";
    document.getElementById("select1").style.display="none";             
    }    
    
    
    document.getElementById("rdo1").onclick = select1;
    document.getElementById("rdo2").onclick = select2;
    </script>
    

    on jsfiddle: http://jsfiddle.net/u8Tvq/

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

Sidebar

Related Questions

I have a user control in a master page with two drop down lists.
I have custom control with two textboxes and one drop down list. I want
lets say i have two drop down list and one button on my search
I have two Drop Down Lists, the second ones are based off which one
Lets say that I have a drop down list that I want to create
I have two tables: I want to fill an ASP.NET server control drop down
I have a form with two drop down menus and I want the selectable
I have two drop down lists. Second one is populated based on value chosen
I have two drop down list on a page. The first one list projects
I have a drop-down list box and two text fields of id values namely

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.