Bug Tracker

Opened 6 years ago

Closed 6 years ago

#14676 closed bug (notabug)

jQuery.val problem for "select" fields

Reported by: gchumillas@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

The .val() method does not work properly for "select" fields when I pass an string object. For example:

$('#my-select-field').val(new String('value')); // does not work
$('#my-select-field').val('value'); // works

Live example: http://jsfiddle.net/cequiel/4yPnR/3/

Change History (1)

comment:1 Changed 6 years ago by scottgonzalez

Resolution: notabug
Status: newclosed

See #4533 and #12538.

Note: See TracTickets for help on using tickets.