paula dougherty
03-28-2007, 05:17 PM
Hi
I'm trying to rename row Id's in a table and then want to rename the cell id's within the row.
I'm having trouble renaming the row Id's andthen accessing the cells within the row.
Any help would be really appreciated as am starting to tear my hair out
var tbl = parent.expenseDisplay.document.getElementById('myTable');
var lastRow = tbl.rows.length;
var tableRows = tbl.rows
for (var i = 1; i <= lastRow; i++) {
newLine = tableRows[i]
newLine.id = "row"+i
}
I'm trying to rename row Id's in a table and then want to rename the cell id's within the row.
I'm having trouble renaming the row Id's andthen accessing the cells within the row.
Any help would be really appreciated as am starting to tear my hair out
var tbl = parent.expenseDisplay.document.getElementById('myTable');
var lastRow = tbl.rows.length;
var tableRows = tbl.rows
for (var i = 1; i <= lastRow; i++) {
newLine = tableRows[i]
newLine.id = "row"+i
}