DHTML Lab: Hierarchical Menus, I; The Complete Code 1/3 | WebReference

DHTML Lab: Hierarchical Menus, I; The Complete Code 1/3


Logo

  DHTML Hierarchical Menus, Part I
  SPECIAL EDITION; the director's cut 1/3

The Page HTML

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
    NS4 = (document.layers) ? 1 : 0;
    IE4 = (document.all) ? 1 : 0;
   ver4 = (NS4 || IE4) ? 1 : 0;
   function popUp(){return};
   function popDown(){return};
   if (!ver4) event = null;
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
    if (NS4) {
        menuWidth = 120;
        borWid = 2;
        fntCol = "black";
        fntSiz = "12px";
        fntWgh = "normal";
        fntSty = "normal";
        fntFam = "sans-serif";
        borCol = "black"
        borSty = "outset";
        linHgt = "normal";
        backCol = "#DDDDDD";
        overCol = "yellow";
        imgSrc = "triangle.gif";
        imgSiz = 10;
        childOverlap = 50;
        childOffset = 3;
        perCentOver = null;
        secondsVisible = .5;
    }
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
if (NS4) {
document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='hierArrays.js'><\/SCRIPT>");
document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='hierMenus.js'><\/SCRIPT>");
}
//-->
</SCRIPT>
</HEAD>
<BODY>
.
.
.
<A HREF="default URL"
      onMouseOver = "popUp('1st menuNameString',event)"
      onMouseOut = "popDown('1st menuNameString')">
         Display HTML for Link</A>
<A HREF="default URL"
      onMouseOver="popUp('2nd menuNameString',event)"
      onMouseOut="popDown('2nd menuNameString')">
         Display HTML for Link</A>
.
.
.
</BODY>
</HTML>

Next, let's review the external JavaScript array file.


Produced by Peter Belesis and

All Rights Reserved. Legal Notices.
Created: Feb. 19, 1998
Revised: Feb. 19, 1998

URL: https://www.webreference.com/dhtml/column14/allCode1.html