|
-
Nov 12th, 2003, 12:05 AM
#1
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
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Nov 12th, 2003, 04:09 AM
#2
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.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 12th, 2003, 09:19 AM
#3
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.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|