Closed
Bug 15361
Opened 25 years ago
Closed 25 years ago
JavaScript is returning undefined for radio button value
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: marshall, Assigned: vidur)
References
()
Details
On, http://www.cyberworldcorp.com/new%20site/products_downloads.html there is a
short piece of javascript which reads the information on the form and writes it
to a cookie.
var product;
for(var i=0;i < document.forms[0].product.length;i++){
if(document.forms[0].product[i].checked){
product = document.forms[0].product[i].value;
}
}
The only problem is, product is returned as undefined in Mozilla, while this
code works in the other 2 browsers. In the cookie viewer all of the other
information is layed out properly (It reads from selection boxes correctly).
Assignee: mccabe → vidur
Component: Javascript Engine → DOM Level 0
QA Contact: cbegle → desale
not a JavaScript engine bug, it's a DOM thing. (see
http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser for info on
mozilla components)
Comment 2•25 years ago
|
||
There are several radio buttons named "product" in the form; the above script
relies on the accepted behavior that JavaScript places those elements into an
array with the specified name.
It's not clear to me that the DOM specifies this behavior, but in any event it
doesn't work in Mozilla right now.
This looks like a duplicate of bug 12307.
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 4•25 years ago
|
||
Duplicate. Marking verified.
You need to log in
before you can comment on or make changes to this bug.
Description
•