-
Hiding Rows
Hi,
Is ther any way i can find out how many rows a table contains and cyle through each rows.
e.g. [psudocode]
for (i=0;i<document.tables['table1'].rows.length();i++)
{
document.tables['table1'].rows[0].styles.display="none";
}
Basically i am trying to hide certain rows(more then one) in a table.
Any Ideas?
Thanks for your help.
Danial
-
Code:
function allRows(table)
{
return table.getElementsByTagName("tr");
}
This is very simple code and it fails for nested tables, because given an outer table it returns all rows of inner tables too.
Of course, nested tables shouldn't be there anyway.
-
Quote:
Originally posted by CornedBee
Code:
function allRows(table)
{
return table.getElementsByTagName("tr");
}
This is very simple code and it fails for nested tables, because given an outer table it returns all rows of inner tables too.
Of course, nested tables shouldn't be there anyway.
Yes very simple and exactly what i was looking for. Thank you very much.