Forum Moderators: open
in body I have:
<td>
<a href="javascript:openMywindow('pic.jpg')">
<img src="images/pic.JPG" width="100" align="center"></a>
</td>
When I view it shows error in line "X" , which comes out to be line 5 of script in head, being "}".
Please help. What I am doing wrong?
Thanks.
+Saini4u
<head>
<style type="text/css">
table.menu { position:absolute; visibility:hidden; }
</style>
<script type="text/javascript">
function showmenu(elmnt)
{
document.all(elmnt).style.visibility="visible"
}
function hidemenu(elmnt)
{
document.all(elmnt).style.visibility="hidden"
}
</script>
</head>
<body><table>
<tr>
<td onmouseover="showmenu('menu1')" onmouseout="hidemenu('menu1')">
Menu heading text<table class="menu" id="menu1">
<tr><td>selection 1</td><tr>
<tr><td>selection 2</td></tr>
</table></td></tr></table>
It uses mouseovers in the <td> which isn't xhtml strict (strike one) and I've heard that it won't work in mozilla either (strike two). I've used it and it's decently easy to setup.
The main table contains the headers of the menu, and each sub table is the sub menu for that heading. Lemme know if It's clear.