Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#8610 closed bug (worksforme)

FireFox 4 serializeArray() duplicate values

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

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 (6)

comment:1 Changed 13 years ago by dmethvin

Owner: set to anonymous
Status: newpending

Can you provide a working test case in jsFiddle please?

comment:2 Changed 13 years ago by anonymous

Status: pendingnew

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 13 years ago by Rick Waldron

Component: unfiledattributes
Resolution: worksforme
Status: newclosed

comment:4 Changed 13 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 Changed 13 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 12 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.

Note: See TracTickets for help on using tickets.