www.fortochka.com

Basic Web Tree Control
(Windows Explorer Style)

Windows Explorer is a well known navigation tool. These JavaScript codes allow the implementation of  this type of tool on a web page (see the left frame as a demo) within minutes by complying with the following instructions:

Download "WebTree.zip" file.

Open "Left.htm" with any text editor.


At the beginning of the document find the code lines with the names of the root directory, directories, files and linked URLs and replace them with the required ones.
Show the codes:


To add a file to a directory create a new code line and assign file name and URL to the array with the name "dirN" where N is a directory index (an index of "dir" array). Please ensure that the index of "dirN" array starts from 0 and its order is correct and ascending.
For example:


To delete a file in a directory delete the line containing it's name and URL. Please ensure that the array index starts from 0 and its order is correct and ascending.
For example:


To add a directory declare a new array with the name "dirN" where N is a new number of directories - 1. Populate this array with names and URLs of files belonging to this directory. Please ensure that all array indexes start from 0 and their order is correct and ascending.
For example:


To delete a directory remove all lines with file names and URLs belonging to this directory, remove the array with the name "dirN" from the list of the variables where N is the biggest integer. Please ensure that all array indexes start from 0 and their order is correct and ascending.
For example:


The number of directories as well as the number of files per directory are practically unlimited.
The Web Tree Control (Windows Explorer Style) works with IE-4 and Firefox.