wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes expand table row Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "expand table row" Watch "expand table row" New topic

expand table row

FY Hsieh
Ranch Hand

Joined: Aug 07, 2006
Posts: 73
Need to display data in a JSP html table with many rows. For some rows, I want to add an expandable icon so when I click the icon that row can expand into some sub-rows and each sub row has its own data, but sub rows have the same column name as other rows.

Can javascript help me get this feature in a HTML table ?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60053

Yes. Once you learn how to use JavaScript to manipulate the DOM, possibilities are endless.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

you might want to look at the display attribute in css,

you could use javascript to track the changes to the expandable icon and change a set of subrow's display to
"inherit" or "none"

just an idea....

My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
I agree. Here's the link: http://aspose.com/file-tools
subject: expand table row
Similar Threads
How to expand and collapse an element in a cell inside data table.
how to expand and hide multiple rows and in table using java script?
table rows expand/collapse formatting
JSP creating html rows for displaying data
How to expand and collapse multiple rows in table using Java script