Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

how to set defaultChecked in firefox and IE7

Greetings all,

Please help me to get the solution to get defaultChecked perform well in both firefox and IE7.
Previously i use the code below it worked fine in IE6 and firefox.
var myCheckBox = document.createElement("input");
myCheckBox.setAttribute("id", ("check1"));
myCheckBox.setAttribute("type", "checkBox");
myCheckBox.setAttribute("checked", true);

but its not working after i update my IE6 to IE7.
please help me.

Best Regards,
helpless
[507 byte] By [puniva] at [2007-11-11 9:56:41]