Using the Tree Menu with Frames

The tree menu may be used with or without a frames environment, however we feel that most implementations should use a frames environment.

Incorporating the Tree menu into a frames environment is fairly straightforward. Once you have defined your frames environment with the standard html frame tags, it is then simply a case of entering the frame names in the target element of the node parameters.

This documentation is a good example of how to use the tree within a frames environment. If you take a look at the source html of index.htm you will see the following,

<html>
<head>
<title>Advanced Tree Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<frameset cols="200,*" frameborder="NO" border="0" framespacing="0">
<frame name="menu" scrolling="NO" noresize src="menu.htm" >
<frameset rows="*,80" frameborder="NO" border="0" framespacing="0">
<frame name="main" scrolling="YES" noresize src="home.htm">
<frame name="foot" scrolling="NO" noresize src="foot.htm">
</frameset>
</frameset>

<noframes><body bgcolor="#FFFFFF"></body></noframes>
</html>

Here we have split the window into three frames named "menu","main" and "foot".

Upon loading the menu frame is loaded with menu.htm, main is loaded with home.htm and foot with foot.htm.

The menu.htm page contains our tree applet. This implementation loads the node information from the data file nodes.txt. If you now look at the nodes.txt file you will see that all the target element of the nodes have all been set to "main". As a consequence all pages from the tree menu are loaded into the frame named "main".

If we wished to load a page into an entirely new window we would enter either a name not already used (e.g.. "newwindow") or "_blank" into the target element of a node parameter.

Please note that Frame names are case sensitive, i.e.. "main" is not the same as "Main".

Further information on frames, naming and referencing can be found at the http://www.w3c.org/ site, in particular the following link,
Frame Name information