JusCoolin
12-07-2003, 11:09 PM
I have the following code that is not working. I simply want the background color of the cell to change when the mouse goes over the link. I can't seem to get this to work!
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.tdlink {
color:black;
font-family:Verdana;
background-color: #FFFFFF;
}
-->
</style>
<SCRIPT language="JavaScript">
<!--
function change_bkgrd(the_cell)
{
if (document.layers)
{
if (document.getElementById(the_cell).backgroundColor = "#FFFFFF")
document.getElementById(the_cell).backgroundColor = "#CCFFFF";
}
if (document.all)
{
if (document.all.GetElementByID(the_cell).style.backgroundColor = "#FFFFFF")
document.all.GetElementByID(the_cell).style.backgroundColor = "#CCFFFF";
}
}
//-->
</SCRIPT>
</head>
<body>
<table>
<tr>
<td name="c1" id="c1" class="tdlink">
<a href="somepage.cfm" onMouseOver="change_bkgrd('c1')" onMouseOut="change_bkgrd_back('c1')">Link</a>
</td>
</tr>
</table>
</body>
</html>
Anybody have any ideas? Thanks!
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.tdlink {
color:black;
font-family:Verdana;
background-color: #FFFFFF;
}
-->
</style>
<SCRIPT language="JavaScript">
<!--
function change_bkgrd(the_cell)
{
if (document.layers)
{
if (document.getElementById(the_cell).backgroundColor = "#FFFFFF")
document.getElementById(the_cell).backgroundColor = "#CCFFFF";
}
if (document.all)
{
if (document.all.GetElementByID(the_cell).style.backgroundColor = "#FFFFFF")
document.all.GetElementByID(the_cell).style.backgroundColor = "#CCFFFF";
}
}
//-->
</SCRIPT>
</head>
<body>
<table>
<tr>
<td name="c1" id="c1" class="tdlink">
<a href="somepage.cfm" onMouseOver="change_bkgrd('c1')" onMouseOut="change_bkgrd_back('c1')">Link</a>
</td>
</tr>
</table>
</body>
</html>
Anybody have any ideas? Thanks!