Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9670 closed bug (duplicate)

selectedIndex returns undefined

Reported by: alex.rdv@… Owned by: alex.rdv@…
Priority: low Milestone: 1.next
Component: attributes Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Description

This works OK in 1.5.2 but returns undefined in 1.6.1

<select name=”testselect” id=”testselect” onChange="alert($(this).attr('selectedIndex'))"> <option value="val1">Value 1</option> <option value="val2">Value 2</option> </select>

Change History (3)

comment:1 Changed 8 years ago by Rick Waldron

Component: unfiledattributes
Owner: set to alex.rdv@…
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, I've created this boilerplate: http://jsfiddle.net/rwaldron/da3nM/ Open the link and click to "Fork" in the top menu.

comment:2 Changed 8 years ago by timmywil

Priority: undecidedlow
Resolution: duplicate
Status: pendingclosed

selectedIndex is not an attribute.

comment:3 Changed 8 years ago by timmywil

Duplicate of #9088.

Note: See TracTickets for help on using tickets.