> I forgot to mention that it is not getting checked ....
I see .... I have to check it after I create it, i.e. I can't create it
in the "checked" condition.
Thanks, let me try that
Fred Oz - 29 Apr 2005 03:51 GMT
> I see .... I have to check it after I create it, i.e. I can't create it
> in the "checked" condition.
No, for IE you have to check it after you *add it to the document*,
Firefox is quite happy for you to check it anytime after it is
created.
Until the checkbox is added to the document (either by appending it
to an element that is part of the document, or adding its parent
element to the document), IE will not check it.
In either case you must create it first before you can do anything
with it - I suspect that will be true of all browsers.
> Thanks, let me try that
Ok.

Signature
Fred
Dietmar Meier - 29 Apr 2005 12:40 GMT
> I see .... I have to check it after I create it, i.e. I can't create
> it in the "checked" condition.
You can. When the checkbox is added to the document (or when the
document is (re)loaded or the form reset), its "defaultChecked"
property determines its initial checked status.
myINPUT = document.createElement("INPUT");
myINPUT.type = "checkbox";
myINPUT.id = myINPUT.name = "myck_box";
myINPUT.value = "Y";
myINPUT.defaultChecked = true;
myINPUT.disabled = true;
ciao, dhgm