wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Expand/Collapse functionality on JSP page 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/Collapse functionality on JSP page" Watch "Expand/Collapse functionality on JSP page" New topic

Expand/Collapse functionality on JSP page

isha krishnan
Ranch Hand

Joined: Nov 10, 2008
Posts: 50
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

Joined: Jan 10, 2002
Posts: 60822

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.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60822

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.
I agree. Here's the link: http://aspose.com/file-tools
subject: Expand/Collapse functionality on JSP page
Similar Threads
create treeview in jsp???????????
Expand and Collapse button: how to find the status of the button
JTree expansion & collapse programatically
Trinidad Nested Tables Collapse and Expand Functionality Change
how to expand only selected node in one level in JTree?