I have to generate checkboxes within a table programatically.
This is what I have until now..
//create a row
var row = document.createElement('tr');
row.className = 'gridrow';
//create td element
td = document.createElement('td');
td.className = 'gridcell';
td.style.fontWeight = 'normal';
td.rowSpan = 1;
td.style.width = '80px';
//create checkbox in that td element
var chkbox = document.createElement('checkbox');
chkbox.id = 'chk' + tbodyNewRowNumber;
chkbox.name = 'chk' + tbodyNewRowNumber;
//add checkbox to td element
td.appendChild(chkbox);
//add td element to row
row.appendChild(td);
However, no checkbox shows up :(
What am I missing here?