Bug Tracker

Opened 13 years ago

Closed 13 years ago

#1976 closed bug (duplicate)

.change() doesn't work for <SELECT>

Reported by: BartekR Owned by:
Priority: major Milestone: 1.2.2
Component: core Version: 1.2.1
Keywords: SELECT .change() Cc:
Blocked by: Blocking:

Description

HTML:

<select name="status" id="status"> <option value="0">Option 0</option> <option value="1">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> <option value="4">Option 4</option> </select>

JS: $('#status').change(function() {

alert('status: ' + $('#status :selected').val());

});

When I change option i <select> nothing happens. Tested on FF 2.0.0.9, IE 6.0 Win XP Prof/WinXP Home

Change History (3)

comment:1 Changed 13 years ago by davidserduke

Does the wiki example here not work for you?

http://docs.jquery.com/Events/change#fn

It works for me in FF 2.0.0.9 as well as IE6/7.

comment:2 Changed 13 years ago by BartekR

I'm sorry, I wasn't percise. I've made more tests, searched the tickets and I think it's error related to http://dev.jquery.com/ticket/1598 and http://dev.jquery.com/ticket/1698. I'm loading the script with $('#details).load(script.php) and the $('#status').change(function() {...) is inside script.php.

I think the ticket can be closed with status duplicate or sth.

comment:3 Changed 13 years ago by davidserduke

Resolution: duplicate
Status: newclosed

The reporter says it is a duplicate so it will be closed as such.

Note: See TracTickets for help on using tickets.