Closed Bug 105398 Opened 23 years ago Closed 23 years ago

Javascript changes the wrong form field.

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 49951

People

(Reporter: froh, Assigned: jst)

References

()

Details

A javascript that changes the value and name of a hidden field in a form and then posts the form behaves incorrectly under Mozilla. Mozilla changes the value of the wrong field. Please look at the webpage http://www.seamless.se/mozilla/ where example code is posted.
The real bug is that the form.elements array is sorted incorrectly. In particular, the sort order _changes_ when you change an element's name. See also bug 49951. ccing jkeiser who may well have this fixed in his tree. :) Oh, and the workaround is to do: var foo = document.xyz.elements[1]; foo.name = "whatever"; foo.value = "something";
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → amar
this is at least related to bug 100499, if not a dup. Not fixed in my tree.
This is a dup of bug 49951. *** This bug has been marked as a duplicate of 49951 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Verified that this is a dupe of bug# 49951
Status: RESOLVED → VERIFIED
In fact, this is dup of 121726 and not 49951 :-)
You need to log in before you can comment on or make changes to this bug.