Bug Tracker

Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#1030 closed bug (duplicate)

value attribute on <option/> element required on IE

Reported by: jimfuller2007 Owned by:
Priority: major Milestone: 1.1.3
Component: core Version: 1.1.2
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by brandon)

When using a selector such as;

$('select#age').val()

to get current selected value (in this case a drop down containing age ) from a <select/> element.

Internet Explorer (IE) doesnt fallback to use node content...e.g. needs value attribute

ex. doesnt work

<option>1</option>

ex. works

<option value="1">1</option>

checking on firefox this is not a problem, on IE 6 up to IE 7 (win 2000 and winxp)

cheers, Jim

Change History (2)

comment:1 Changed 17 years ago by malsup

This is not a bug. The val() method makes no attempt at solving cross-browser issues like this. It simply returns the current value of the element's value property. FF implicitly promotes an option element's text to the value property if the value attribute is missing.

comment:2 Changed 16 years ago by brandon

Description: modified (diff)
need: Review
Resolution: duplicate
Status: newclosed

Duplicate of 1008

Note: See TracTickets for help on using tickets.