vcherubini
Programmer
Hello, I am writing a script that has drop down menu's on a page.
I am pretty new to web programming, so I need some help.
Here is the code, but it does not work.
<style>
#dropDown {
font-family:verdana;
font-size:10px;
}
a {
text-decoration:none;
color:black;
align:middle;
}
</style>
<script language=javascript>
var isMinNS4=(navigator.appName.indexOf("Netscape">=0&&parseFloat(navigator.appVersion)>=4)?1:0;
var isMinIE4=(document.all)?1:0;
function hideMenu() {
if (isMinNS4) layer.visibility = "hide";
if (isMinIE4) layer.style.visibility = "hidden";
}
function showMenu() {
if (isMinNS4) layer.visibility = "show";
if (isMinIE4) layer.style.visibility = "visible";
}
</script>
</head>
<body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0>
<table border=0 cellpadding=0 cellspacing=0 width=640 height=480>
<tr>
<td width=640 height=87 colspan=7>
<img src="images/cityscape.jpg"></td>
</tr>
<tr>
<td width=64 height=23>
<a href="index.html"><img src="images/home.jpg" border=0></a></td>
<td width=108 height=23>
<a href="#" onClick="javascript:showMenu();"><img src="images/whatsnew.jpg" border=0></a></td>
<td width=94 height=23>
<a href="portfolio.html"><img src="images/portfolio.jpg" border=0></a></td>
<td width=96 height=23>
<a href="aboutus.html"><img src="images/aboutus.jpg" border=0></a></td>
<td width=106 height=23>
<a href="contactus.html"><img src="images/contactus.jpg" border=0></a></td>
<td width=102 height=23>
<a href="thesource.html"><img src="images/thesource.jpg" border=0></a></td>
<td width=70 height=23>
<img src="images/endspacer.jpg" border=0></td>
</tr>
<tr>
<td width=640 height=290 colspan=7>
<img src="images/mainpage.jpg"></td>
</tr>
<tr>
<td width=640 height=80 colspan=7>
<img src="images/logo.jpg"></td>
</tr>
</table>
<div id="dropDown" style="position:absolute; visibility:hidden; top:110px; left:68px; width:100px; height:200px; border:1px solid; background:#7191A0;">
<a href="link1">link1</a><br>
<a href="link1">link1</a><br>
<a href="link1">link1</a><br>
<a href="link1">link1</a><br>
</div>
I have it where when clicked on, the function should show the layer that is right below the link.
Any help with this would be greatly appreciated.
Thanks.
-Vic [sig]<p>vic cherubini<br><a href=mailto:malice365@hotmail.com>malice365@hotmail.com</a><br><a href= software</a><br>====<br>
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director<br>
Wants to Know: Java, Cold Fusion, Tcl/TK<br>
====[/sig]
I am pretty new to web programming, so I need some help.
Here is the code, but it does not work.
<style>
#dropDown {
font-family:verdana;
font-size:10px;
}
a {
text-decoration:none;
color:black;
align:middle;
}
</style>
<script language=javascript>
var isMinNS4=(navigator.appName.indexOf("Netscape">=0&&parseFloat(navigator.appVersion)>=4)?1:0;
var isMinIE4=(document.all)?1:0;
function hideMenu() {
if (isMinNS4) layer.visibility = "hide";
if (isMinIE4) layer.style.visibility = "hidden";
}
function showMenu() {
if (isMinNS4) layer.visibility = "show";
if (isMinIE4) layer.style.visibility = "visible";
}
</script>
</head>
<body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0>
<table border=0 cellpadding=0 cellspacing=0 width=640 height=480>
<tr>
<td width=640 height=87 colspan=7>
<img src="images/cityscape.jpg"></td>
</tr>
<tr>
<td width=64 height=23>
<a href="index.html"><img src="images/home.jpg" border=0></a></td>
<td width=108 height=23>
<a href="#" onClick="javascript:showMenu();"><img src="images/whatsnew.jpg" border=0></a></td>
<td width=94 height=23>
<a href="portfolio.html"><img src="images/portfolio.jpg" border=0></a></td>
<td width=96 height=23>
<a href="aboutus.html"><img src="images/aboutus.jpg" border=0></a></td>
<td width=106 height=23>
<a href="contactus.html"><img src="images/contactus.jpg" border=0></a></td>
<td width=102 height=23>
<a href="thesource.html"><img src="images/thesource.jpg" border=0></a></td>
<td width=70 height=23>
<img src="images/endspacer.jpg" border=0></td>
</tr>
<tr>
<td width=640 height=290 colspan=7>
<img src="images/mainpage.jpg"></td>
</tr>
<tr>
<td width=640 height=80 colspan=7>
<img src="images/logo.jpg"></td>
</tr>
</table>
<div id="dropDown" style="position:absolute; visibility:hidden; top:110px; left:68px; width:100px; height:200px; border:1px solid; background:#7191A0;">
<a href="link1">link1</a><br>
<a href="link1">link1</a><br>
<a href="link1">link1</a><br>
<a href="link1">link1</a><br>
</div>
I have it where when clicked on, the function should show the layer that is right below the link.
Any help with this would be greatly appreciated.
Thanks.
-Vic [sig]<p>vic cherubini<br><a href=mailto:malice365@hotmail.com>malice365@hotmail.com</a><br><a href= software</a><br>====<br>
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director<br>
Wants to Know: Java, Cold Fusion, Tcl/TK<br>
====[/sig]