Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

expand table row

 
FY Hsieh
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64607
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Once you learn how to use JavaScript to manipulate the DOM, possibilities are endless.
 
salvin francis
Bartender
Posts: 1263
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic