drdexter33
Programmer
Say i have a table, and I get a reference to it like this:
--------------------------------------------------------
var table = document.getElementById('table');
--------------------------------------------------------
And then say I have a row and I get a reference to it like this:
--------------------------------------------------------
var rows = table.getElementsByTagName('tr');
--------------------------------------------------------
Why can't I loop through the rows object I found like this:
--------------------------------------------------------
for(var j=0; j<rows.length; j++)
{
var cells = rows[j].getElementById("cbCell");
}
--------------------------------------------------------
And get a reference to a cell called 'cbCell' which contains a checkbox, and read that checkbox state?
--------------------------------------------------------
var table = document.getElementById('table');
--------------------------------------------------------
And then say I have a row and I get a reference to it like this:
--------------------------------------------------------
var rows = table.getElementsByTagName('tr');
--------------------------------------------------------
Why can't I loop through the rows object I found like this:
--------------------------------------------------------
for(var j=0; j<rows.length; j++)
{
var cells = rows[j].getElementById("cbCell");
}
--------------------------------------------------------
And get a reference to a cell called 'cbCell' which contains a checkbox, and read that checkbox state?