This site heavily relies on bug reports created by its readers. Anyone can report a bug and be published.
Main navigation:
Search reports by browser:
If you move a checkbox through the document by W3C DOM methods, the checkbox returns to its default state (checked or unchecked).
Test page. Workaround is included.
Reported by ppk.
Explorer 5-6 Windows, Explorer 7 beta 2 | Reported on 29 October 2004.
Posted by Kae on 2 December 2004
2This bug seems to also apply when checkboxes are created dynamically.
This script, for example, creates checkboxes dynamically. If the initial state of these must be "checked", then Buberto's workaround must be used.
http://verens.com/archives/2004/09/03/multiselect/
Posted by Graham Lea on 9 February 2006
4This problem also occurs when cloning checkboxed.
Commenting guidelines:
Posted by Huberto Kusters on 24 November 2004
1IE Windows uses the property 'defaultChecked' as its initial value.
So my guess is to have the 'onchange' event set this property equal to the 'checked' property, like this:
function checkIt(oInput) {
if (typeof oInput.defaultChecked != 'undefined') {
oInput.defaultChecked = oInput.checked;
}
return true;
}
...
<input type="checkbox" onchange="checkIt(this);">