| Author |
How to write a javascript function to exapand/collapse all nodes in a TreeMenu
|
Keerthi Chandhu
Greenhorn
Joined: Feb 03, 2009
Posts: 16
|
|
Hi,
I am trying to write a javascript function to collapse/expand all nodes in a tree menu.
Could anyone please give me some idea how to write this function?
Thank you.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56529
|
|
|
Where's your code?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Devaka Cooray
Saloon Keeper
Joined: Jul 29, 2008
Posts: 2726
|
|
Agree with Bear,
It depends on your implementation.
|
Author of ExamLab (Download) - the free mock exam kit for SCJP / OCPJP
Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
if you need a starting place:
onclickobj.style.display="none"
Eric
|
 |
Keerthi Chandhu
Greenhorn
Joined: Feb 03, 2009
Posts: 16
|
|
Hi,
Please find my code.
I am trying to write a function like
If user clicks a collapse all button it should collapse entire tree view nodes.
I do not understand how to check the condition to find whether a tree is expanded or not. if( tree.Expanded){
Any suggestions would be appreciated.
Thank you.
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
And what is the tree that you are using? There are 1000's of them out there.
Eric
|
 |
Keerthi Chandhu
Greenhorn
Joined: Feb 03, 2009
Posts: 16
|
|
I am using java script and jsp to create a TreeMenu which is dynamically driven from database.
I am using JSP and Jdbc to get tree node names from database and calling javascript fuction to create the tree and able to create tree.
I am looking for help in writing expand all/collapse all nodes function for a treemenu.
I hope this the information you are looking for,else I can provide more information.
Thank you.
|
 |
 |
|
|
subject: How to write a javascript function to exapand/collapse all nodes in a TreeMenu
|
|
|