Closed
Bug 105398
Opened 23 years ago
Closed 23 years ago
Javascript changes the wrong form field.
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
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.
![]() |
||
Comment 1•23 years ago
|
||
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
Comment 2•23 years ago
|
||
this is at least related to bug 100499, if not a dup. Not fixed in my tree.
Assignee | ||
Comment 3•23 years ago
|
||
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Comment 5•23 years ago
|
||
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.
Description
•