Skip to main content

Bug Tracker

Side navigation

#6650 closed bug (fixed)

Opened June 09, 2010 01:50PM UTC

Closed June 10, 2010 12:51AM UTC

$.ajax data conversion not according to the documentation.

Reported by: jq_johan Owned by:
Priority: Milestone: 1.4.3
Component: data Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:
Description

In the doc http://api.jquery.com/jQuery.ajax/ (data section)it says:

"{foo:["bar1", "bar2"]} becomes '&foo=bar1&foo=bar2'"

But actually {foo:["bar1", "bar2"]} becomes:

'&foo[]=bar1&foo[]=bar2'

My code:

$(document).ready(function(){

$("a.myLink").bind("click",function(){

$.ajax({

url:"ajaxPage.html",

data: {foo:["bar1","bar2"]}

});

}) ;

});

Attachments (0)
Change History (1)

Changed June 10, 2010 12:51AM UTC by dmethvin comment:1

resolution: → fixed
status: newclosed

That was a change between 1.3.2 and 1.4. If you pass

traditional:true
you can get back the old behavior. I have updated the documentation to clarify things.