I’m trying to dynamically create a checkbox element with the checked status being true however it never works in IE, I’ve tried everything I can think of. The code works in firefox but IE never checks the box, when I do an alert it says its checked but it does not render the check.
var chk_box = document.createElement(“input”);
chk_box.checked = true;
chk_box.setAttribute (“type”,”checkbox”);
chk_box.setAttribute (“name”,”vulns”+i);
chk_box.setAttribute (“value”,”1″);
item.appendChild(chk_box);
I’ve also tried:
chk_box.setAttribute (“checked”,true);
and
item.lastChild.checked = true;
none seem to work in IE, any tips? thanks!