W
Ward Germonpré
Hi,
I have a reference to a dom table.
How can I retrieve the number of columns in that table ?
The stop value below doesn't work, nor did my experimenting with
tbodies[0] and childNodes..
....
var thistable = document.getElementById('resultaattbl');
for (var j=0, stop = thistable.tbody.rows[0].length; j<stop; j++) {
....
I find it bizar that the tbody shortcut works in this instance :
thistable.tbody.appendChild(newRow);
but not in the above for loop.
thx
Ward
I have a reference to a dom table.
How can I retrieve the number of columns in that table ?
The stop value below doesn't work, nor did my experimenting with
tbodies[0] and childNodes..
....
var thistable = document.getElementById('resultaattbl');
for (var j=0, stop = thistable.tbody.rows[0].length; j<stop; j++) {
....
I find it bizar that the tbody shortcut works in this instance :
thistable.tbody.appendChild(newRow);
but not in the above for loop.
thx
Ward