Closed
Bug 18623
Opened 26 years ago
Closed 26 years ago
checkbox.checked & radio.checked return false onload of document.
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
WORKSFORME
People
(Reporter: desale, Assigned: vidur)
Details
Attachments
(1 file)
|
598 bytes,
text/html
|
Details |
checkbox.checked & radio.checked return false onload of document, even if
CHECKED attribute is specified in HTML. Once document is loaded then it starts
returning true.
BUILDS: 1999-11-11-09.
STEPS TO REPRODUCE:
1] Copy HTML code I'm providing. Save it as HTML file.
2] Open this HTML file with mozilla.exe with above specified builds.
3] As soon as you load page, you'll see one alert. Observe message on alert.
4] Click OK on this alert.
5] After loading page, you'll see one button "Show Checked". Click this button.
6] You'll see one alert. Observe message on alert.
7] Click OK on this alert.
EXPECTED RESULTS:
Both alerts should show same message [Since I'm calling same alert onLoad of
document, and onClick of button.]
It should show message like this both the times.
CheckBox Checked = true & Radio Checked = true
ACTUAL RESULTS:
First alert shows,
CheckBox Checked = false & Radio Checked = false [Which is wrong, since we are
using CHECKED attribute in HTML for checkbox as well as radio.]
Second Alert shows
CheckBox Checked = true & Radio Checked = true [Which is correct.]
TESTCASE CODE START:
<html>
<head>
<title>CheckBox and Radio</title>
</head>
<script type="text/javascript">
<!--
function showcheked(){
alert("CheckBox Checked = " + document.workform.testcbx.checked + " & Radio
Checked = " + document.workform.testrad.checked);
}
//-->
</script>
<body onLoad="showcheked();">
<FORM NAME="workform">
Check Box: <INPUT TYPE="checkbox" NAME="testcbx" VALUE="testvalue" CHECKED><br>
Radio: <INPUT TYPE="radio" NAME="testrad" VALUE="testvalue" CHECKED><br>
<INPUT TYPE="button" NAME="testbut" VALUE="Show Checked"
onClick="showcheked();">
</FORM>
</body>
</html>
TESTCASE CODE END:
| Reporter | ||
Comment 1•26 years ago
|
||
Works okay with the latest build. The alert message is displayed in the console
window (maybe a separate issue), but it says:
Browser Window Alert: CheckBox Checked = true & Radio Checked = true
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → WORKSFORME
| Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
| Reporter | ||
Comment 3•26 years ago
|
||
Verified with 12-14-09.
| Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•