...

View Full Version : Navigation Menu



joeyc
01-02-2004, 07:09 AM
I'm having this problem that i wrote my navigation menu using javascript (very similar to the one that javascript kit using).. Whenever i minimise my browser, instead of having a scrollbar at the bottom of my webpage, the navigation menu append which makes my web page out of alignment. Would jus like to ask if anyone can help with this problem.

Instead of my menu moving down, i wan a scrollbar to appear.

Thank you

rsci
01-02-2004, 02:12 PM
Code?

joeyc
01-06-2004, 01:06 AM
<head>
<script type="text/javascript">
<!--
var time = 3000;
var numofitems = 8;

//menu constructor
function menu(allitems,thisitem,startstate){
callname= "gl"+thisitem;
divname="subglobal"+thisitem;
this.numberofmenuitems = 8;
this.caller = document.getElementById(callname);
this.thediv = document.getElementById(divname);
this.thediv.style.visibility = startstate;
}

//menu methods
function ehandler(event,theobj){
for (var i=1; i<= theobj.numberofmenuitems; i++){
var shutdiv =eval( "menuitem"+i+".thediv");
shutdiv.style.visibility="hidden";
}
theobj.thediv.style.visibility="visible";
}

function closesubnav(event){
if ((event.clientY <140)||(event.clientY > 209)){
for (var i=1; i<= numofitems; i++){
var shutdiv =eval('menuitem'+i+'.thediv');
shutdiv.style.visibility='hidden';
}
}
}
// -->
</script>
</head>

<body>
<div id="globalLink">
<a href="company/overview.php" id="gl1" class="glink" onmouseover="ehandler(event,menuitem1);">CORPORATE</a>
<a href="news/press.php" id="gl2" class="glink" onmouseover="ehandler(event,menuitem2);">NEWS & EVENTS</a>
<a href="product/intro.php" id="gl3" class="glink" onmouseover="ehandler(event,menuitem3);">PRODUCTS &amp; SERVICES </a>
</div>

<script type="text/javascript">
<!--
var menuitem1 = new menu(8,1,"hidden");
var menuitem2 = new menu(8,2,"hidden");
var menuitem3 = new menu(8,3,"hidden");
var menuitem4 = new menu(8,4,"hidden");
var menuitem5 = new menu(8,5,"hidden");
var menuitem6 = new menu(8,6,"hidden");
var menuitem7 = new menu(8,7,"hidden");
var menuitem8 = new menu(8,8,"hidden");
// -->
</script>
</body>

Above are the part of the code. Thank you



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum