Dynamically Show/Hide table rows?

H

Harry

I want to provide a drill down facility for the users - the plan is to
intially display a table with summary rows containing results of previous
selected search criteria.

In each summary row you have a button to drill down i.e which displays X
number of rows with results that make up the summary row value. When
"drilled down" also provide a button to "collapse" the detail rows!

Is it possible to show/hide individual rows in a table? - do I have to have
each row as a table & a DIV statement around it?

I know it must be possible buts whats the best way?

thanks

harry
 
V

Vjekoslav Begovic

Harry said:
Is it possible to show/hide individual rows in a table?

Of course: You have to locate that rows and change their style property to
style.display = 'none' or style.display = 'block'.
 
D

DU

Harry said:
I want to provide a drill down facility for the users - the plan is to
intially display a table with summary rows containing results of previous
selected search criteria.

In each summary row you have a button to drill down i.e which displays X
number of rows with results that make up the summary row value. When
"drilled down" also provide a button to "collapse" the detail rows!

Is it possible to show/hide individual rows in a table? - do I have to have
each row as a table & a DIV statement around it?

I know it must be possible buts whats the best way?

thanks

harry

"The 'visibility' property takes the value 'collapse' for row, row
group, column, and column group elements. This value causes the entire
row or column to be removed from the display, and the space normally
taken up by the row or column to be made available for other content. (...)"
Support for visibility:collapse is not good in current browsers.
http://www.w3.org/TR/CSS2/tables.html#dynamic-effects
Therefore you need to use display:none (and display:table-row) to toggle
entire rows.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html
 
V

Vjekoslav Begovic

DU said:
"The 'visibility' property takes the value 'collapse' for row, row
group, column, and column group elements. This value causes the entire
row or column to be removed from the display, and the space normally
taken up by the row or column to be made available for other content. (...)"
Support for visibility:collapse is not good in current browsers.
http://www.w3.org/TR/CSS2/tables.html#dynamic-effects
Therefore you need to use display:none (and display:table-row) to toggle
entire rows.

Which is good for Mozilla, but IE6 says 'Could not get the display property.
Invalid argument'.
display:block works good in IE6, but not in Mozilla.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top