Hi all,
I have asked this question in several other html/css/javascript specific forums throughout the web to no avail. Can LQ help with a non-LQ question?! I hope so! At
http://www.bartlett-family.net/sokhan I have found a JS drop-down menu I like and have implemented it (I got the script from
Dynamic Drive). Unfortunately, I know very little about javascript. In IE and Opera, the page looks great and works perfectly. In NS7, there is a problem with the drop-down menus, which is this:
The 4 links towards the top (My Obnoxious Husband, My Beautiful Son, My Family, My Extended Family) are supposed to generate drop-down menus when clicked. This DOES happen, but in NS7, you'll notice that the drop-down menus pop up all the way in the top-left corner of the screen. Can anyone help me fix that so they pop up where they're supposed to (right below the link)? I'd appreciate it. You'll see it, but looking at the html, you'll notice that there actually 14 seperate JS files being called regarding this script, but the main one is menu2.js which is this:
Code:
var zindex=100
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
var opr=navigator.userAgent.indexOf("Opera")
function dropit(e,whichone){
curmenuID=ns6? document.getElementById(whichone).id : eval(whichone).id
if (window.themenu&&themenu.id!=curmenuID)
themenuStyle.visibility=ns4?"hide" : "hidden"
themenu=ns6? document.getElementById(whichone): eval(whichone)
themenuStyle=(ns6||ie4)? themenu.style : themenu
themenuoffsetX=(ie4&&opr==-1)? document.body.scrollLeft : 0
themenuoffsetY=(ie4&&opr==-1)? document.body.scrollTop : 0
themenuStyle.left=ns6||ns4? e.pageX-e.layerX : themenuoffsetX+event.clientX-event.offsetX
themenuStyle.top=ns6||ns4? e.pageY-e.layerY+19 : themenuoffsetY+event.clientY-event.offsetY+18
hiddenconst=(ns6||ie4)? "hidden" : "hide"
if (themenuStyle.visibility==hiddenconst){
themenuStyle.visibility=(ns6||ie4)? "visible" : "show"
themenuStyle.zIndex=zindex++
}
else
hidemenu()
return false
}
function hidemenu(){
if ((ie4||ns6)&&window.themenu)
themenuStyle.visibility="hidden"
else if (ns4)
themenu.visibility="hide"
}
if (ie4||ns6)
document.onclick=hidemenu
Everything else about this page works fine, it's just the lack of proper functionality in NS. Can anyone help me out? Thanks a million!
Chris