...

View Full Version : onmouseover/out unsupported in Netscape



joshley
12-15-2004, 07:11 AM
Greatings,

I need help finding a way to solve this situation : oddly, I have to design a site that can be seen by old browsers (like Netscape 4.0) and by new browsers as well. I'm trying to code rollovers using javascript but Dreamweaver tells me that
"the onMouseover attribute of the TD tag is not supported. [Netscape Navigator 4.0, Netscape Navigator 6.0]".

It's just a cell with text on it and a rollover function written in javascript. Is there a workaround ? I'm not using images, just changing the color of the cell and text. Here's the code :

<HTML>
<HEAD>
<TITLE>bottom_menu</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<style type="text/css">
.base { font-family:Georgia, "Times New Roman", Times, serif;
font-size:11px;
font-weight:bold;
color: #003D53;
background-color:#979685;
text-align:center;
text-decoration:none;
}

</style>
<script language="javascript">
function rollover(id, bgcolor, txtcolor)
{
var obj = document.getElementById(id);
if(bgcolor){
obj.style.backgroundColor = bgcolor;}
if(txtcolor){
obj.style.color = txtcolor;}
}
</script>
</HEAD>
<BODY BGCOLOR=#D0EEFC>
<!-- ImageReady Slices (bottom_menu.psd) -->
<table width=324 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=324 height=8 colspan=9 bgcolor=#D0EEFC><img src="images/spacer.gif" alt=""></td>
</tr>
<tr>
<td width=11 height=35 rowspan=2 bgcolor=#D0EEFC><img src="images/spacer.gif" alt=""></td>
<td id="homeColor" width=74 height=26 bgcolor=#979685 class="base" onmouseover="rollover('homeColor', '#003D53', '#D0EEFC')" onMouseOut="rollover('homeColor', '#979685', '#003D53')"
onClick="window.location.href='http://www.google.com/'">Home</td>
<td width=3 height=35 rowspan=2 bgcolor=#D0EEFC><img src="images/spacer.gif" alt=""></td>
<td id="signupColor" width=74 height=26 bgcolor=#979685 class="base" onmouseover="rollover('signupColor', '#003D53', '#D0EEFC')"
onmouseout="rollover('signupColor', '#979685', '#003D53')" onclick="window.location.href='http://www.yahoo.com/'">Sign up</td>

... (rest of the code)

Thanks !

Kor
12-15-2004, 09:38 AM
1.Try a full CSS solution or:
2. Use CSS for text rollover and apply the javascript rollover event handlers upon the text, not TD.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum