Closed
Bug 223396
Opened 22 years ago
Closed 22 years ago
Radio with ID *and* NAME not addressable with JavaScript
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: w-w-w, Unassigned)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007
If you have defined an ID- *and* a NAME-attribute for an INPUT TYPE="RADIO"
Mozilla 1.5 (and Firebird 0.7) can't address the INPUT element.
JavaScript Console says: "f.abc[0] has no properties". When I delete either the
ID- *or* the NAME-attribute the sample works.
<!-- START: SAMPLE -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Test</title>
<script type="text/javascript">
<!--
function myfunc(f) {
if (f.abc[0].checked == false && f.abc[1].checked == false)
alert("Nothing selected ...");
else if(f.abc[0].checked == true)
alert("1")
else if(f.abc[1].checked == true)
alert("2")
else
alert("???")
}
//-->
</script>
</head><body>
<form name="form1" action="" onsubmit="myfunc(this)">
<input type="radio" id="abc" name="abc" value="1"> 1
<input type="radio" id="abc" name="abc" value="2"> 2
<br><input type="submit" value="Submit">
</form>
</body></html>
<!-- END: SAMPLE -->
Reproducible: Always
Steps to Reproduce:
Comment 1•22 years ago
|
||
You must not have two identical id in a document.
| Reporter | ||
Updated•22 years ago
|
Version: Trunk → Other Branch
Comment 3•22 years ago
|
||
This got fixed when jst deCOMtaminated nsIContent.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Updated•14 years ago
|
Assignee: validation → nobody
Component: DOM: Validation → DOM: Core & HTML
OS: Windows 2000 → All
QA Contact: general
Hardware: x86 → All
You need to log in
before you can comment on or make changes to this bug.
Description
•