I'm creating a table on the fly.. everything is working fine except the checkbox should be checked.
var cellThird = row.insertCell(2);
var el = document.createElement('input');
el.setAttribute('type', 'checkbox');
el.setAttribute('name','e_tmpl_vis');
if(selectedTmpl.value=="true"){
alert("true"); //This is creating an alert at the correct time.
el.setAttribute('value', 'on'); // I've tried both of these, neither seem to work.
el.setAttribute('checked','true');
}else{
el.setAttribute('value', 'off');
}
//el.onclick=function() {toggleArrayCheckBoxValue(this)}
cellThi