| Author |
on clicking all hidden rows of table are displayed
|
rammie singh
Ranch Hand
Joined: Mar 26, 2009
Posts: 116
|
|
Hi everybody
I want to have an html page where in if i click on say "+", the "+" becomes "-" and all the hidden rows are dispalye and if i click on "-" the rows are hidden back. how can we do that??
Can anybody please help me.
Thanks and Regards
|
 |
Rob Hunter
Ranch Hand
Joined: Apr 09, 2002
Posts: 788
|
|
|
AJAX can do that for you. Give your table an ID and in a javascript grab the table object and loop through the children (i.e. rows) and make them visible or hidden as you go through them. If you have more specific requirements (i.e. start at certain row clicked on) you might want to check out (google) rowIndex. I'm sure you'll get other responses in here that are more efficient but that's how I would do it if I had to right now. Hope it helps.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56192
|
|
Ajax really isn't necessary. It's really just a matter of using the display CSS property appropriately.
Ajax would only be necessary if one wishes to delay the fetching of the hidden data until it is required. In that case, Ajax is indispensable.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: on clicking all hidden rows of table are displayed
|
|
|