DHTML Lab: HierMenus CENTRAL: Version 3 Full Window Instructions, Step 4 - dhtmlab.com | WebReference

DHTML Lab: HierMenus CENTRAL: Version 3 Full Window Instructions, Step 4 - dhtmlab.com

Instructions -
Full Window (No Frames) -
Step 4 of 5

Revised: June 26, 2001


Return to Step 3Step 4 of 5Go to Step 5
Include hierArrays.js and the main menu script, hierMenus.js, in your page by conditionally loading them for menu-enabled browser versions.

By now, you should have created your external array file (step 3) and in-page script for your navigation page (step 1 and step 2). Your page requires two final scripts to include the two external files required. Include the following as the final scripts in your navigation page's HEAD, after the step 1 and step 2 scripts:

<SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
<!--
if (isMenu) {
document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='hierArrays.js'><\/SCRIPT>");
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
<!--
if (isMenu) {
document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='hierMenus.js'><\/SCRIPT>");
}
//-->
</SCRIPT>
</HEAD>
<BODY>

The SRC attribute should point to the correct location for the two external files. In the example above, hierArrays.js and hierMenus.js are in the same sub-directory as your page. If you keep your external scripts in a special directory, make sure the SRC attribute is modified accordingly.

Remember that hierArrays.js is the file you created in step 3 and hierMenus.js is the DHTML Lab script that you have downloaded and left untouched, unless you feel confident in modifying it. Make sure that hierMenus.js is the latest version!

Note: If you are using Active Server Pages, please read the FAQ regarding an ASP-specific modification you must make.

Now that you have defined the content and look of the menus you want to appear in your page, all that remains is to define the page's "hot spots", that is, the links that actually cause the menus to display.

Return to Step 3
Step 4 of 5
Go to Step 5

Produced by Peter Belesis and

All Rights Reserved. Legal Notices.
Created: July 20, 1999
Revised: Nov 17, 1999

URL: http://www.webreference.com/dhtml/hiermenus/version3/instructions/noframes/step4.html