Link to home
Start Free TrialLog in
Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America

asked on

Event fires first time only?

In the code below, the alert message fires the very first time I pick something from the drop down list.

But after that, the alert message does not fire when I choose something from the same drop down.




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

    if (loc.indexOf("COURSESEARCH") != -1)
    {   

        $("select").change(function ()
        {
    
            $("select option:selected").each(function ()
            {
                  alert($(this).text());
    
            });
    
        });
    

    }
});

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tom Knowlton

ASKER

No argument that js.fiddle code works.

I need help tracking down where the javascript might be broken.


Let me put together a test page of my own and see if I can narrow this down.
Are you using any other Javascript framework?
I don't think so...
Firebug report nothing ???
I tried looking for errors in the Firebug console, but none were reported
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thx