Drop Down Text Link Menu Depth of 1

[Total: 0    Average: 0/5]

This shows how to have a text only menu that is a drop down type menu.

Body Code:

<DIV CLASS=menbar1 ID=menbar1 STYLE="position:absolute;top:1;visibility:visible;" zIndex=10 ALIGN=right>
  <table bgcolor="#ffffff"><tr><td><A HREF="javascript:change(1)">Open MenuBar</A></td></tr></table>
</DIV>
<DIV CLASS=menbar2 ID=menbar2 STYLE="position:absolute;top:1;visibility:hidden;" zIndex=15 ALIGN=right>
<table bgcolor="#ddeeff"><tr><td bgcolor="#ffffff"><a href="javascript:change(2)">Close MenuBar</a><br></td></tr><tr><td>
<a href="http://www.js-examples.com">Your Links 1</a><br>
<a href="http://www.js-examples.com">Your Links 2</a><br>
<a href="http://www.js-examples.com">Your Links 3</a><br>
<a href="http://www.js-examples.com">Your Links 4</a><br>
</td></tr></table>
</DIV>
<script type=text/javascript>

var JX = 0;
var JY = 0;

if(navigator.appName == "Netscape") {
var wm = document.menbar1;
}

if (navigator.appVersion.indexOf("MSIE") != -1) {
var wm = document.all.menbar1;
}

function change(wow) {

  if(navigator.appName == "Netscape") {
    if (wow == 1) {
      wm.visibility = "hide";
      wm = document.menbar2;
    }
    if (wow == 2) {
      wm.visibility = "hide";
      wm = document.menbar1;
    }
  }

  if (navigator.appVersion.indexOf("MSIE") != -1) {
    if (wow == 1) {
      wm.style.display = "none";
      wm = document.all.menbar2;
	  wm.style.display = "";
    }
    if (wow == 2) {
      wm.style.display = "none";
      wm = document.all.menbar1;
	  wm.style.display = "";
    }
  }
  menbar();
}

function menbar() {

 if(navigator.appName == "Netscape") {
   JX = window.pageXOffset;
   JY = window.pageYOffset;
   wm.visibility = "hide";
   wm.top = JY;
   wm.left = JX;
   wm.visibility= "show";
 }

 if (navigator.appVersion.indexOf("MSIE") != -1){
  if (navigator.appVersion.indexOf("Mac") == -1){
   wm.style.display = "none";
   JX = document.body.scrollLeft;
   JY = document.body.scrollTop;
   wm.style.top  = JY;
   wm.style.left = JX;
   wm.style.display = "";
   wm.style.visibility = "visible";
  }
 }
}
</script>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *