Opened 13 years ago
Closed 13 years ago
#6650 closed bug (fixed)
$.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"]}
});
}) ;
});
Note: See
TracTickets for help on using
tickets.
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.