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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:27:17+00:00 2026-05-25T10:27:17+00:00

When a user choose the a option in the first list below (id=1), I’d

  • 0

When a user choose the “a” option in the first list below (id=1), I’d like to display the second form (id=2). How detect the choice of a user in a list (just a selection, not a submission) ?

 <form method="post" id="1" >
      <select name="menu_destination">
           <option value="a" >A</option>
           <option value="b">B</option>
      </select>
 </form>

 <form method="post" id="2" >
      <select name="menu_destination">
           <option value="a" >A</option>
           <option value="b">B</option>
      </select>
 </form>

Edit: I’ve already encounter another problem : each time I select an option, it displays a list without hiding the others. annoying, no ?

$("select#category").change(function() {
    var category = $(this).val();
    $("select#"+category).toggle();
});
  • 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-25T10:27:17+00:00Added an answer on May 25, 2026 at 10:27 am

    Simple. And IDs should not start with numbers, at least not until HTML5 is all over the place.

    $("#one select").change(function() {
        $("#two").toggle($(this).val() == "a");
    });
    

    Demo.

    Note: In the demo, the second form’s visibility is initially hidden via style="display:none" but it is visible when the page loads because we initially trigger the change event to set the correct state of the form according to the what is initially selected (i.e. what is initially rendered) in the first form’s drop-down.

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

Sidebar

Related Questions

I have a form in which the user can choose a component type from
On my site I have given an option to user to choose thier profile
I have an page with a selection box, the first option of which is
HTML <ul> <li id=listSize style=display: block;> <label class=topspace>Field Size:</label> <select id=fieldSize name=fieldSize> <option>Choose a
My application has a need to let the user choose a date from a
I have a page upon which a user can choose up to many different
I have an app that allows the user to choose an image, at design
I've build a Windows service that allows a user to choose a DSN and
I've created a PreferenceActivity that allows the user to choose the theme he wants
I am creating a script that allows the user to choose their own timezone...

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.