Skip to main content

Bug Tracker

Side navigation

#1600 closed bug (fixed)

Opened September 12, 2007 03:14PM UTC

Closed September 15, 2007 12:23AM UTC

Last modified September 04, 2009 08:58AM UTC

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){
Attachments (0)
Change History (1)

Changed September 15, 2007 12:23AM UTC by john comment:1

resolution: → fixed
status: newclosed

Fixed in SVN rev [3293].