mattover-matter
04-17-2003, 11:54 PM
I am working on a dropdown menu, and this "simple" function is driving me mad.
<html>
<head>
<title>Home</title>
<style type="text/css">
body {
background-color: #000000;
background: url("stars.gif");
color: #45aeff;
margin: 0px;
margin-top: 10px;
scrollbar-base-color: #222222;
scrollbar-arrow-color: #45aeff
}
a {
text-decoration: none;
font-size: 12px;
width: 100;
height: 26;
position: relative;
top: 7px;
}
a:link, A:visited {
color: #45aeff
}
a:hover {
color: #ffffff
}
a:active {
color: #cccccc
}
table, td {
margin: 0px;
border-collapse: collapse;
padding: 0px;
}
</style>
<script language="text/javascript">
function showmenu('div', 'cell'){
div.style.visibility=visible;
cell.style.background=url("menu-background-highlight.gif");
}
</script>
</head>
<body>
<table width="100%">
<tr>
<td background="menu-background.gif"> </td>
<td align="center" id="linkcell1" width="100" background="menu-background.gif"><A href="#" onmouseover="showmenu('dropdown1', 'linkcell1')">Link</a></td>
<td background="menu-background.gif"> </td>
<td align="center" id="linkcell2" width="100" background="menu-background.gif"><A href="#">Link</a></td>
<td background="menu-background.gif"> </td>
<td align="center" id="linkcell3" width="100" background="menu-background.gif"><A href="#">Link</a></td>
<td background="menu-background.gif"> </td>
<td align="center" id="linkcell4" width="100" background="menu-background.gif"><A href="#">Link</a></td>
<td background="menu-background.gif"> </td>
<td align="center" id="linkcell5" width="100" background="menu-background.gif"><A href="#">Link</a></td>
<td background="menu-background.gif"> </td>
<td align="center" id="linkcell6" width="100" background="menu-background.gif"><A href="#">Link</a></td>
<td background="menu-background.gif"> </td>
</tr>
</table>
<div id="dropdown1" style="visibility: hidden;">
some more text
</div>
text
<EMBED src="music.mp3" width="144" height="60" autostart="true" loop="true" hidden="true">
</body>
</html>
i want it to onmouseover show the div and change the background. Why won't it work?
<html>
<head>
<title>Home</title>
<style type="text/css">
body {
background-color: #000000;
background: url("stars.gif");
color: #45aeff;
margin: 0px;
margin-top: 10px;
scrollbar-base-color: #222222;
scrollbar-arrow-color: #45aeff
}
a {
text-decoration: none;
font-size: 12px;
width: 100;
height: 26;
position: relative;
top: 7px;
}
a:link, A:visited {
color: #45aeff
}
a:hover {
color: #ffffff
}
a:active {
color: #cccccc
}
table, td {
margin: 0px;
border-collapse: collapse;
padding: 0px;
}
</style>
<script language="text/javascript">
function showmenu('div', 'cell'){
div.style.visibility=visible;
cell.style.background=url("menu-background-highlight.gif");
}
</script>
</head>
<body>
<table width="100%">
<tr>
<td background="menu-background.gif"> </td>
<td align="center" id="linkcell1" width="100" background="menu-background.gif"><A href="#" onmouseover="showmenu('dropdown1', 'linkcell1')">Link</a></td>
<td background="menu-background.gif"> </td>
<td align="center" id="linkcell2" width="100" background="menu-background.gif"><A href="#">Link</a></td>
<td background="menu-background.gif"> </td>
<td align="center" id="linkcell3" width="100" background="menu-background.gif"><A href="#">Link</a></td>
<td background="menu-background.gif"> </td>
<td align="center" id="linkcell4" width="100" background="menu-background.gif"><A href="#">Link</a></td>
<td background="menu-background.gif"> </td>
<td align="center" id="linkcell5" width="100" background="menu-background.gif"><A href="#">Link</a></td>
<td background="menu-background.gif"> </td>
<td align="center" id="linkcell6" width="100" background="menu-background.gif"><A href="#">Link</a></td>
<td background="menu-background.gif"> </td>
</tr>
</table>
<div id="dropdown1" style="visibility: hidden;">
some more text
</div>
text
<EMBED src="music.mp3" width="144" height="60" autostart="true" loop="true" hidden="true">
</body>
</html>
i want it to onmouseover show the div and change the background. Why won't it work?