Bug Tracker

Modify

Ticket #9670 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

selectedIndex returns undefined

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

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

comment:1 Changed 2 years ago by rwaldron

  • Owner set to alex.rdv@…
  • Status changed from new to pending
  • Component changed from unfiled to attributes

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 2 years ago by timmywil

  • Priority changed from undecided to low
  • Status changed from pending to closed
  • Resolution set to duplicate

selectedIndex is not an attribute.

comment:3 Changed 2 years ago by timmywil

Duplicate of #9088.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.