Quote:
|
all the element id's for a given element are the same across rows
|
That's a problem in itself. All IDs should be unique, otherwise you're defeating the purpose. Make them unique and you can access each directly.
You can also access individual TD elements using the built-in array properties for tables:
var el = tableElement.rows[i].cells[j]
so if you know which row you're on and which columns you want, you can just use the index:
tdElement = trElement.cells[n];
TD elements also have a .cellIndex property so if you want the next cell to the right use something like:
var nextTdElement = tdElement.parentNode.cells[tdElement.cellIndex + 1]