How to create a tree structure

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
chitrapu
Forum Newbie
Posts: 23
Joined: Sun Jan 14, 2007 11:39 pm

How to create a tree structure

Post by chitrapu »

i need to create a tree structure that has to expand and collapse when the button is clicked. How do i do this
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

nested list tree? http://be.twixt.us/jquery/treeView.php

drag'n'drop-able tree? http://interface.eyecon.ro/demos/drag_drop_tree.html

:google:

"There are more javascript trees on the internet than are dream'd of in your philosophies"
chitrapu
Forum Newbie
Posts: 23
Joined: Sun Jan 14, 2007 11:39 pm

thanks a lot

Post by chitrapu »

thanks a lot but i need some code to do that. The links show only the tree structures. :twisted: :P :?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

:banghead:

:google:
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

If you look at the code from the links provided you should get an answer to your question. Another possible resource is Nested Tree Display : Comments appreciated. I would like to point out that I built the original code for an application where several tree solutions using javascript (found using google) failed on large trees, or didn't allow me to add/remove tree nodes dynamically. I intend to look at the jquery solution and test what it's limits are but I have been meaning to do that for a couple of months. :wink:
Post Reply