Bug Tracker

Modify

Ticket #5066 (closed bug: duplicate)

Opened 4 years ago

Last modified 3 years ago

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:1 Changed 4 years ago by El_Wray

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.
		});
	});

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.

comment:3 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

comment:4 Changed 3 years ago by dmethvin

Duplicate of #5930.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.