southprojects DHTML Tree Widget - Dynamic Tree - JSON

Dynamic Tree - JSON

Using options source and sourceType you can specify source from which tree structure will be loaded. For example in this demo tree is constructed from JSON object, which is loaded from remote file.
Using option jsonLoadCallback you can write your own function to parse retrieved JSON object. It receives received JSON object as argument and must return array of <LI> DOM nodes to add.
Also, if sourceType option was set to "json" or "json/url", this function will be used to transform retrieved data.

- load branch

Collapse all -- Collapse the whole tree and only show the top branches
Toggle lines -- Hide/display the lines that connect the various nodes.
When you click a node the branch is displayed.
No node selected.

You can, of course, customize the code to take actions other than just displaying the node.