Modify ↓
Ticket #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: | ||
| Blocking: | Blocked by: |
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"]}
});
}) ;
});
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
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.