I have a pre-defined table with all rows hidden like this:
<tr id="row1" style="display: none;">
</tr>
<tr id="row2" style="display: none;">
</tr>
<tr id="row3" style="display: none;">
</tr>
<tr id="row4" style="display: none;">
</tr>
<tr id="row5" style="display: none;">
</tr>
<tr id="row6" style="display: none;">
</tr>
I am trying to use Javascript to add cells to each row and then show it. My javascript currently gets the row id and at the end it will show that row. but I can't figure out how to add cells to it, here my function:
function CreateTable(numberOfLines, linesCollection, displayCollection) {
for (var i = 0; i < numberOfLines; i++) {
var rowId = 'row' + (i + 1);
var row = document.getElementById(rowId);
document.getElementById('row' + (i + 1)).style.display = "";
}
}