jQuery in Action, 3rd edition
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
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: 63837

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

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

Joined: Jan 12, 2009
Posts: 1108

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....

I agree. Here's the better link: Salvin.in

I agree. Here's the link: http://aspose.com/file-tools
subject: expand table row
It's not a secret anymore!