Tree Menu v1.4 July 13, 2006
File Listing
This is a PHP program demonstrating the use of TreeMenu to produce a list of files and folders. The directory listed by the program is hardwired to be the folder where the program is located, but that could easily be changed.
In this example, instead of letting the Javascript add the file and
folder icons like normal, they are added on the server side so that
the icons for different file types could be easily determined. Adding
the icons on the server side requires an extra support function for the
TreeMenu.show_all()
and TreeMenu.hide_all()
functions in order to properly change the state of the added icons.
It also requires a custom function to set the initial state of the
symbols when ever the page is rendered. This page contains examples
of both functions.
Download
A zip file of this document and the the TreeMenu JavaScript source code can be downloaded here: TreeMenu-1.4.zip