SearedIce
06-12-2003, 02:57 PM
Here's the script/html code:
<html>
<head>
<title>Menu Test</title>
<script langauge="javscript">
var whichmenu;
function bringDown(whichmenu)
{
document.???????????.style.visibility = "visible";
}
</script>
</head>
<body>
<div onMouseOver="bringDown(1);" style="border: solid #000000 1px; position: absolute; top: 10px; left: 10px; width: 100px; height: 20px">
HAHAMENU1
</div>
<div onMouseOver="bringDown(2);" style="border: solid #000000 1px; position: absolute; top: 10px; left: 110px; width: 100px; height: 20px">
HAHAMENU2
</div>
<div id="popdown1" style="border: solid #000000 1px; position: absolute; top: 30px; left:10px; width: 50px; height: 20px; visibility: hidden">
POPDOWN1
</div>
<div id="popdown2" style="border: solid #000000 1px; position: absolute; top: 30px; left:60px; width: 50px; height: 20px; visibility: hidden">
POPDOWN2
</div>
</body>
</html>
See the ????????? ?
Well...given either the number of menu div or name of menu div passed into the function from the onMouseOver, how can I change the correct menu thing to be visible
Yes, I know I could make a bunch of If statements to pick which menu to change but I want to be able to add any number of "menus" and not have to worry about copying the code for each menu (in case I want to make a change to all of them later but by then I have like 20 "menus")
please help,
John
<html>
<head>
<title>Menu Test</title>
<script langauge="javscript">
var whichmenu;
function bringDown(whichmenu)
{
document.???????????.style.visibility = "visible";
}
</script>
</head>
<body>
<div onMouseOver="bringDown(1);" style="border: solid #000000 1px; position: absolute; top: 10px; left: 10px; width: 100px; height: 20px">
HAHAMENU1
</div>
<div onMouseOver="bringDown(2);" style="border: solid #000000 1px; position: absolute; top: 10px; left: 110px; width: 100px; height: 20px">
HAHAMENU2
</div>
<div id="popdown1" style="border: solid #000000 1px; position: absolute; top: 30px; left:10px; width: 50px; height: 20px; visibility: hidden">
POPDOWN1
</div>
<div id="popdown2" style="border: solid #000000 1px; position: absolute; top: 30px; left:60px; width: 50px; height: 20px; visibility: hidden">
POPDOWN2
</div>
</body>
</html>
See the ????????? ?
Well...given either the number of menu div or name of menu div passed into the function from the onMouseOver, how can I change the correct menu thing to be visible
Yes, I know I could make a bunch of If statements to pick which menu to change but I want to be able to add any number of "menus" and not have to worry about copying the code for each menu (in case I want to make a change to all of them later but by then I have like 20 "menus")
please help,
John