DHTML Lab: HierMenus CENTRAL: Version 3 Frameset Instructions, Step 5 - dhtmlab.com | WebReference

DHTML Lab: HierMenus CENTRAL: Version 3 Frameset Instructions, Step 5 - dhtmlab.com

Instructions -
Frameset Menus -
Step 5 of 6

Revised: June 26, 2001


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

By now, you should have created your external array file (step 4) and in-page script for your navigation page (step 2 and step 3). Your navigation 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 2 and step 3 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 navigation frame 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 4 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 all the main frame documents, all that remains is to define the navigation frame "hot spots", that is, the links that actually cause the menus to display.

Return to Step 4
Step 5 of 6
Go to Step 6

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/frameset/step5.html