Skip to main content

Bug Tracker

Side navigation

#1976 closed bug (duplicate)

Opened November 27, 2007 07:00AM UTC

Closed November 28, 2007 07:41AM UTC

.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

Attachments (0)
Change History (3)

Changed November 27, 2007 03:34PM UTC by davidserduke comment:1

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.

Changed November 28, 2007 06:26AM UTC by BartekR comment:2

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.

Changed November 28, 2007 07:41AM UTC by davidserduke comment:3

resolution: → duplicate
status: newclosed

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