Hi,
Trying to construct a new site, and am using Dreamweaver, my problem is, I am using a standard template,
and I cannot get the menu to work correctly.
I am using a pop up, when click over a link in the menu, it causes a sub-menu to pop-up,
BUT, as soon as I try to move the mouse to the sub menu, is dissapears!
Sorry if I am being dense, but I am new to this! Copy of the relevant code below....
- Code: Select all
//menu constructor
function menu(allitems,thisitem,startstate){
callname= "gl"+thisitem;
divname="subglobal"+thisitem;
this.numberofmenuitems = 7;
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 <48)||(event.clientY > 107)){
for (var i=1; i<= numofitems; i++){
var shutdiv =eval('menuitem'+i+'.thediv');
shutdiv.style.visibility='hidden';
}
}
}
// -->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body onmousemove="closesubnav(event);">
<div class="skipLinks">skip to: <a href="#content">page content</a> | <a href="pageNav">links on this page</a> | <a href="#globalNav">site navigation</a> | <a href="#siteInfo">footer (site information)</a> </div>
<div id="masthead">
<h1 id="siteName"> </h1>
<div id="globalNav">
<img alt="" src="http://www.webforumz.com/images/gblnav_left.gif" height="32" width="4" id="gnl"> <img alt="" src="http://www.webforumz.com/images/glbnav_right.gif" height="32" width="4" id="gnr">
<div id="globalLink">
<a href="#" id="gl1" class="glink" onmouseover="ehandler(event,menuitem1);">Home Page</a><a href="#" id="gl2" class="glink" onmouseover="ehandler(event,menuitem2);">Live Traffic </a><a href="#" id="gl3" class="glink" onmouseover="ehandler(event,menuitem3);">History of the M25 </a><a href="#" id="gl4" class="glink" onmouseover="ehandler(event,menuitem4);">Looking to the Future </a><a href="#" id="gl5" class="glink" onmouseover="ehandler(event,menuitem5);">Junctions</a><a href="#" id="gl6" class="glink" onmouseover="ehandler(event,menuitem6);">Forums</a><a href="#" id="gl7" class="glink" onmouseover="ehandler(event,menuitem7);">Links</a>