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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:37:07+00:00 2026-05-24T03:37:07+00:00

I have a dropdown box that I am setting another event to. This is

  • 0

I have a dropdown box that I am setting another event to. This is how I have my HTML set up:

      <p> Please select a number:
<select name="selectNumber" id="selectNumber">
  <option value="1" <%if (number.equals("1")) {%>selected<%}%>>1</option>
  <option value="2" <%if (number.equals("2")) {%>selected<%}%>>2</option>
  <option value="3" <%if (number.equals("3")) {%>selected<%}%>>3</option>
  <option value="4" <%if (number.equals("4")) {%>selected<%}%>>4</option>
  <option value="5" <%if (number.equals("5")) {%>selected<%}%>>5</option>
  <option value="6" <%if (number.equals("6")) {%>selected<%}%>>6</option>
</select>
</p>
<div id="orgDiv">
   <p> HELLO!! </p>
</div>

And here is my jQuery:

        $(document).ready(function() {
      $('#orgDiv').hide()
    });
    $('#selectNumber').change(function(){
      $('#orgDiv').show();
    });

So it obviously hides the div when the DOM is finished loading. The problem I am having is as soon as I click the dropdown box……it shows the div. It does not wait until I select something in the dropdown. Is there another event I can use?

  • 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-24T03:37:08+00:00Added an answer on May 24, 2026 at 3:37 am

    You need to listen for the change event inside document ready.

       $(document).ready(function() {
          $('#orgDiv').hide()
          $('#selectNumber').change(function(){
            $('#orgDiv').show();
          });
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a button 'button' that activates a dropdown box 'box': $('.button').click(function() { $(this).siblings(.box).toggle();
I have a dropdown box that allows users to select how many inputs they
Dropdown In my site I have a set of SELECT dropdowns that are set
I have the following dropdown box <form name=myform method=POST ACTION=songs.php> Select Category: <select id=sel
I have the following dropdown list box: <select name=DDLConditional1 size=1> <option selected=selected>is equal to</option>
I have a PHP registration that calls a mysql db for a dropdown box.
INSERT MODE i have check box in one tr. and another dropdown control in
I have a dropdown list that stores name/value pairs. The dropdown appears in each
I have a dropdown box that I construct with PHP. Here is the code:
I have a dropdown list box that displays data from my database. Problem is

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.