Javascript Problem - Drop down menu |
Javascript Problem - Drop down menu |
Jan 8 2008, 10:48 AM
Post
#1
|
|
|
Member ![]() ![]() Group: Member Posts: 22 Joined: Nov 2006 Member No: 483,287 |
Hi.. I'm wondering if anyone can help me.....I'm building a website in my web design class at college and have come accross a problem with a javascript code I tried to create for my menu.
This is the script in my header: CODE <script type="text/javascript"> function showmenu(elmnt) { document.getElementById(elmnt).style.visibility="visible"; } function hidemenu(elmnt) { document.getElementById(elmnt).style.visibility="hidden"; } </script> and this is the script in my HTML: CODE <div id="servingyou" onmouseover="showmenu('servingdrop')" onmouseout="hidemenu('servingdrop')"><a href="web.html" valign="center">Serving You</a></div> <table class="servingtable" id="servingdrop" width="100" cellspacing="0" onmouseover="showmenu('servingdrop')" onmouseout="hidemenu('servingdrop')"> <tr><td class="cell"><a href="council.html">The Council</a></td></tr> <tr><td class="cell"><a href="minutes.html">Minutes</a></td></tr> <tr><td class="cell"><a href="reports.html">Annual Reports</a></td></tr> </table> I also have this in my CSS defining the table: CODE table.servingtable { position:absolute; top:55px; left:282px; visibility:hidden; z-index:1; } When opened in IE6 it shows an error. And the drop down menu also appears when the mouse isn't even hovering over the button.. but only on certain areas of the page. Can anyone help me? |
|
|
|
Emmi237 Javascript Problem - Drop down menu Jan 8 2008, 10:48 AM
libertie I actually don't get any errors when I test it... Jan 8 2008, 03:07 PM![]() ![]() |