This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
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: 60766
    
  65

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
table rows expand/collapse formatting
How to expand and collapse multiple rows in table using Java script
JSP creating html rows for displaying data
how to expand and hide multiple rows and in table using java script?
How to expand and collapse an element in a cell inside data table.