www.fortochka.com

Basic Web Tree Control
(Windows Explorer Style)

Windows Explorer is a well known navigation tool. These JavaScript codes implement the simplified version of this tool on a web page within minutes.

Download "WebTree.zip" file.

Open "Left.htm" with any text/html editor.


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


To add a file to a directory create a new element of the correspondent array. Please ensure that the array index starts from 0 and its order is correct and ascending.
For example:


To delete a file in a directory delete the correspondent element from the directory array. 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 number of directories - 1. Populate this array with file names and URLs. Please ensure that all array indexes start from 0 and their order is correct and ascending.
For example:


To delete a directory remove the array with the name "dirN" where N is the biggest integer. Please ensure that all array indexes start from 0 and their order is correct and ascending.
For example: