Cross browser DHTML

W

Web Master

The following works in Internet Explorer 6 and Opera, but not Netscape 7.1.

Is there any way to make this work in all three browsers?

<html>
<head>
<title>Menu</title>
</head>
<body>
<div style="position: absolute; left: 250; top: 172; width: 62; height: 115"
id="dv1">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" bordercolor="#111111" width="100%" id="tb1"
onMouseover="tb2.style.visibility='visible';"
onMouseout="tb2.style.visibility='hidden';">
<tr>
<td width="100%" bgcolor="#0000FF"><b><font size="4"
color="#FFFFFF">Menu</font></b></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" bordercolor="#111111" width="100%" id="tb2">
<tr>
<td width="100%" bgcolor="#00FFFF">Item 1</td>
</tr>
<tr>
<td width="100%" bgcolor="#00FFFF">Item 2</td>
</tr>
<tr>
<td width="100%" bgcolor="#00FFFF">Item 3</td>
</tr>
<tr>
<td width="100%" bgcolor="#00FFFF">Item 4</td>
</tr>
<tr>
<td width="100%" bgcolor="#00FFFF">Item 5</td>
</tr>
</table>
</div>
<script>
tb2.style.visibility="hidden";
//tb2.style.visibility="visible";
</script>
</body>
</html>
 
W

Web Master

Lasse Reichstein Nielsen said:
7.1.

Everywhere it says "tb2.style.visibility=..." you should change it to
"document.getElementById('tb2').style.visibility=...".
Thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top