Bug Tracker

Modify

Ticket #8610 (closed bug: worksforme)

Opened 2 years ago

Last modified 2 years ago

FireFox 4 serializeArray() duplicate values

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: 1.next
Component: attributes Version: 1.5.1
Keywords: Cc:
Blocking: Blocked by:

Description

In FireFox 4 (ONLY) serializeArray() is duplicating all the form entries.

code: var str = ""; $.each($('#element_id *'), function (i, o) {

str += o.name + "=" + o.value + "|";

}); alert(str);

Change History

comment:1 Changed 2 years ago by dmethvin

  • Owner set to anonymous
  • Status changed from new to pending

Can you provide a working test case in jsFiddle please?

comment:2 Changed 2 years ago by anonymous

  • Status changed from pending to new

I have noticed this happening as well, but have a difficult time reproducing it. It seems to happen sporadically

 http://jsfiddle.net/QEaav/1/

comment:3 Changed 2 years ago by rwaldron

  • Status changed from new to closed
  • Resolution set to worksforme
  • Component changed from unfiled to attributes

Cannot be reproduced...

 http://jsfiddle.net/rwaldron/QEaav/3/

comment:4 Changed 2 years ago by anonymous

This is happening on my website every time on Firefox 4 only. I've tried to reproduce on jsFiddle but it works fine in there.

Maybe it is affected by some plugin or something. I will investigate it ...

comment:5 follow-up: ↓ 6 Changed 2 years ago by anonymous

Figured out my issue, with the help of a co-worker, I was improperly selecting elements to get what I needed I was doing a $foms.find(':visible'), this was getting elements that I did not expect. changing it to a .filter(':visible') fixed the issue

comment:6 in reply to: ↑ 5 Changed 2 years ago by anonymous

Replying to anonymous:

Figured out my issue, with the help of a co-worker, I was improperly selecting elements to get what I needed I was doing a $foms.find(':visible'), this was getting elements that I did not expect. changing it to a .filter(':visible') fixed the issue

The way I select the elements is: $('#element_id *') where "element_id" is the form container. But the funny thing is that is working on jsFiddle.

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.