Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Select from drop down list works first time but not second time, third time?

Posted on 2011-10-19
Medium Priority
Last Modified: 2012-05-12
The alert message below DOES fire the first time I choose an item from the drop down list.

But then if I go back and select a different item from the drop down list, the alert message does not fire.

$(document).ready(function ()
    var loc = window.location.href.toUpperCase(); 

    if (loc.indexOf("COURSESEARCH") != -1)
        $('span[id*="Label1"]').text("Retreiving Data - Please wait...");

        $('option').click(function ()

            alert("clicked on an option value");


Open in new window

Question by:Tom Knowlton
LVL 83

Accepted Solution

leakim971 earned 2000 total points
ID: 36996666
replace line 10 by : $('select').change(function ()

Author Closing Comment

by:Tom Knowlton
ID: 37008041

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month12 days, 7 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question