Bug Tracker

Opened 7 years ago

Closed 7 years ago

#12923 closed bug (notabug)

Copying select values from one form to another

Reported by: njbarrett7@… Owned by:
Priority: undecided Milestone: None
Component: selector Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:

Description

See this jsFiddle http://jsfiddle.net/Lybff/2/

I expect the code to copy the select value from form1 into form2. This works when the select name attribute is a simple word, however when the select name attribute has opening and closing square brackets "?" it doesn't work in jQuery 1.8.2 or jQuery (edge).

However it DOES work when I switch jsFiddle to 1.6.4.

I am using Internet Explorer 8 on Windows 7 x64.

Change History (2)

comment:1 Changed 7 years ago by anonymous

Correction Internet Explorer 9 on Windows 7 x64

comment:2 Changed 7 years ago by gibson042

Component: unfiledselector
Resolution: notabug
Status: newclosed

From http://api.jquery.com/category/selectors/attribute-selectors/:

Attribute values in selector expressions *must* follow the rules for W3C CSS selectors, in general that means anything other than a simple identifier should be surrounded by quotation marks.

Note: See TracTickets for help on using tickets.