File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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
Marshal

Joined: Jan 10, 2002
Posts: 61224
    
  66

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: 928

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]
 
Don't get me started about those stupid light bulbs.
 
subject: expand table row