Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#1600 closed bug (fixed)

serializeArray returns incorrect val if value is array

Reported by: wizzud Owned by:
Priority: major Milestone: 1.2.1
Component: ajax Version: 1.2
Keywords: serializearray Cc:
Blocked by: Blocking:

Description

I believe there is a bug in serializeArray whereby using...

<select multiple="multiple" name="test[]">
    <option value="one" selected="selected">One</option>
    <option value="two">Two</option>
    <option value="three" selected="selected">Three</option>
</select>
$('select').serialize();

returns 'test[]=0&test[]=1' instead of 'test[]=one&test[]=three';

I think the problem is line 2094(ish)...

jQuery.map( val, function(i, val){

which should be...

jQuery.map( val, function(val, i){

Change History (1)

comment:1 Changed 13 years ago by john

Resolution: fixed
Status: newclosed

Fixed in SVN rev [3293].

Note: See TracTickets for help on using tickets.