I am creating a table with number of rows changing dynamically. The pseudo code looks like below.
<table id=’tbl’>
<thead>
<th> col1 </th>
<th> col2 </th>
</thead>
<tbody>
<%for i= 1 to n%>
<tr>
<td> name=CELL1<%=i%> value=”xyz” </td>
<td> name=CELL1<%=i%> value=”xyz” </td>
</tr>
<%next %>
</tbody>
</table
n is an input from user, and I create the number of rows. I want to elminate this and use .insertRow() method to insert rows.
When I implemented it, it is incrementing # of rows. I have a display stament to show # of rows in the table (document.all.table.rows.length), but the rows are not being displayed.
I tried in a static table, 2×2, it is working fine…
Can someone throw light on this please?