JavaScript is returning undefined for radio button value

VERIFIED DUPLICATE of bug 12307

Status

()

defect
P3
normal
VERIFIED DUPLICATE of bug 12307
20 years ago
20 years ago

People

(Reporter: marshall, Assigned: vidur)

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

()

Reporter

Description

20 years ago
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).

Updated

20 years ago
Assignee: mccabe → vidur
Component: Javascript Engine → DOM Level 0
QA Contact: cbegle → desale

Comment 1

20 years ago
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

20 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

20 years ago
Status: NEW → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → DUPLICATE

Comment 3

20 years ago
*** This bug has been marked as a duplicate of 12307 ***

Updated

20 years ago
Status: RESOLVED → VERIFIED

Comment 4

20 years ago
Duplicate. Marking verified.
You need to log in before you can comment on or make changes to this bug.