Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Expand/Collapse functionality on JSP page

 
isha krishnan
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I need some suggestions on how can i add Expand/Collapse functioinality on JSP Page. Currently i am having Tree functionality on that page. On every click on page on (+/-) image ,it expands and collapse. It is done without using standard expand and collapse functionality as available in JavaScript using DIV ID's. I need to implement expand/collapse alongwith treesructure.

For evry click on Expand: Tree will expand by one level
For Every click on Collapse: Tree will collapse by one level.




 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose an appropriate forum for your posts. This forum is for questions on JSP. For more information, please click this link ⇒ CarefullyChooseOneForum.

This post has been moved to the HTML and JavaScript forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The fact the the HTML page sent to the browser was generated by a JSP is completely moot. Once the page gets to the browser, it's just like any other HTML page.

So what are you asking? How to do this with JavaScript?

If so, you'd use a combination of event handlers to trigger when elements are clicked upon, and the display CSS property to control the visibility of the elements.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic