A collapsible heirarchical tree component.
hidden form fields.
The main features that distinguish this component are:
- The tree's nodes can contain arbitrary HTML -
and can dynamically resize themselves horizontally and
- Persistence of the state of the tree when users leave
the page and return to it again is handled using hidden form
fields - and does not depend on cookies;
- Controls are available to collapse and expand multiple
nodes in the tree at once;
- Nodes of the tree are sensitive to the mouse pointer -
giving the user immediate feedback about which areas are
A more complex tree - with a nested sub-tree
Sites using the tree component
The tree has been tested with Internet Explorer, Mozilla, Firefox and Opera.
whatever - the usual behaviour will be to show the tree with
all the nodes expanded.
This is normally a pretty safe fall-back position - and
ensures all the content is still accessible.
Not all browsers support persistence via hidden form fields.
Mozilla/Firefox do not do it yet - for example. If there is
no support for persistent form fields, then the tree's state
won't persist either.
Rendering trees from a database
Code for rendering trees from an SQL database is available - but
it comes with the tree editor - and is not in the smaller
download containing just the tree component.
Rendering trees from an XML file
This code hasn't been written yet.
A zip file containing all the relevant files is available
This program and its source code have been placed into the public domain by its author.