Welcome to the second part of a two-part series on building a tree with Active Client Pages. In this part, we will use the example of a museum's web site to take a close look at the code for a session. We'll see how the tree facilitates project development.
Completing a Tree with Active Client Pages - The Code (Page 2 of 4 )
The Master Page
To save time and space, I will describe only what goes on in the master page. The master page is the treeACP.htm HTML file. What goes on in the other pages is similar. If you understand Perl you will not have any problem understanding the code of the other files, each of which sends a page string to the browser. This is the skeleton of the master page:
<html>
<head>
</head>
<body>
<!- - visible HTML first page elements - - >
<script type="text/javascript">
//content of furniture window
var furnitureStr = "";
function ajaxFurn()
{
//statements to download the furniture window of general description
}
ajaxFurn();
//content of shoes window
var shoesStr = "";
function ajaxShoes()
{
//statements to download the shoes window of general description
}
ajaxShoes();
//content of bags window
var bagsStr = "";
function ajaxBags()
{
//statements to download the bags window of general description
}
ajaxBags();
function furnitureFn()
{//to open furniture window of general description