Ticket #5066 (closed bug: duplicate)
Firefox 3.5.2 update Broke passing arrays through $.get() function.
| Reported by: | El_Wray | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.3.2 |
| Component: | ajax | Version: | 1.3.2 |
| Keywords: | get firefox broken | Cc: | |
| Blocking: | Blocked by: |
Description
This code worked, and still works on IE
myArrayVar = ['a','b','c','d'];
$.get("someUrl", {'param1':'val1', 'param2':'val2', 'arrayParam[]':myArrayVar});
Parameters 1 & 2 get passed and works great. arrayParam is ignored. Used to work on firefox 3.5.1 but the new update 3.5.2 killed it. The array "arrayParams" is never passed. Checked it with Firebug and the request doesn't send the array as a param.
Change History
comment:2 Changed 4 years ago by El_Wray
More testing showed the problem is not really in passing arrays. The problem is in the selectors,
var selObjects=$("input[name='sel[]'][checked=true]");
This no longer works. Looks like the issue is with the checked attribute.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

More details on the problem.
$("#deleteBtn").live("click",function(){ var selObjects=$("input[name='sel[]'][checked=true]"); var sel = new Array(); selObjects.each(function(){ sel.push($(this).val()); }); $.get(".",{'sel[]':sel},function(data){ //Do something, show stuff. }); });