Closed Bug 57137 Opened 25 years ago Closed 24 years ago

[FIX][CHK]checkbox.checked does not always work.

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Windows 2000
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: email1, Assigned: rods)

References

()

Details

(Whiteboard: Fix in hand)

The following code should always keep the checkbox value from changing. It works in IE & Netscape but not in Mozilla. ------------- <html> <head><script type="text/javascript" language="JavaScript"><!-- function CoverPageBreakEnabled() { document.forms[0].CoverPageBreak.checked = 0; } --></script></head> <body> <form> <input type="checkbox" name="CoverPageBreak" onClick="return CoverPageBreakEnabled();">Page break after cover page </form> </body> </html>
In IE 5.5 and NS 4.7 this code only seems to make it so you have to click a checkbox twice in order for it to change state. In Mozilla, it seems to have no effect. I also placed the code from the description into a web page (to avoid having to copy and paste it yourself) at http://home.earthlink.net/~jsteenhagen/mozilla/57137/
Hmmm... the carriage return between "return" and "CoverPageBreakEnabled" prevents the example from working on IE5.5 & NS 4.7.
Status: UNCONFIRMED → NEW
Ever confirmed: true
My bad... didn't comensate for word wrap. Once removing that CR, the bug does work as described.
Browser, not engine. --> DOM Level 0
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → desale
Summary: checkbox .checked does not always work. → checkbox.checked does not always work.
looks and tastes like a formcontrol bug to me, reassigning to rods.
Assignee: jst → rods
marking as invalid, it seems to work as expected
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
I'm not sure what you're expecting. According to the reporter, this javascript it supposed to prevent a checkbox from being checked. It works in both MSIE and NS4, but not in Mozilla (I just tested on a CVS build from this morning). If by INVALID you mean there is now .checked property for a checkbox (or it is read only at runtime) per the JavaScript spec, please reinvalidate this. Otherwise, I'd say it is not working as expected. Adding 4xp keyword and reopening.
Status: RESOLVED → REOPENED
Keywords: 4xp
Resolution: INVALID → ---
Status: REOPENED → ASSIGNED
Summary: checkbox.checked does not always work. → [FIX][CHK]checkbox.checked does not always work.
Whiteboard: Fix in hand
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Verify FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.