PDA

View Full Version : netscape 4.x - td object problem


tyler jones
09-05-2002, 06:52 PM
I am passing in a table cell to a function in my script using something like...

onMouseOver="dothis(this);"

The script just changes the bgcolor in IE by doing something like...

function dothis(obj)
{
obj.style.backgroundColor = "red";
}

So, I'm wondering how to accomplish the same thing in NS4.x Anyone have any ideas? Thanks.

adios
09-05-2002, 10:49 PM
<html>
<head>
<style type="text/css">

#menu {
position: absolute;
left: 100px;
top: 100px;
border: 3px white ridge;
background-image: url(http://www.grsites.com/textures/comp/comp005.gif);
layer-background-image: url(http://www.grsites.com/textures/comp/comp005.gif);
}

a {
font: 400 16px monospace;
color: #ddffdd;
text-decoration: none;
}

a:hover {
color:#00ff00;
}

</style>
<script type="text/javascript" language="JavaScript">

//preloader
var x = new Image;
x.src = 'http://www.grsites.com/textures/comp/comp005.gif';

</script>
</head>
<body bgcolor="#eeeeff">

<div id="menu">
<table cellspacing="5" cellpadding="0" border="1"
bordercolor="#000000" bordercolordark="#777777" bordercolorlight="#d0d0d0">
<tr>
<td onmouseover="this.style.background='#000000'" onmouseout="this.style.background=''">
<ilayer><layer onmouseover="this.bgColor='#000000'" onmouseout="this.bgColor=null">
<a href="#" onclick="return false;">&amp;nbsp;Link&amp;nbsp;1&amp;nbsp;</a>
</layer></ilayer></td></tr><tr>
<td onmouseover="this.style.background='#000000'" onmouseout="this.style.background=''">
<ilayer><layer onmouseover="this.bgColor='#000000'" onmouseout="this.bgColor=null">
<a href="#" onclick="return false;">&amp;nbsp;Link&amp;nbsp;2&amp;nbsp;</a>
</layer></ilayer></td></tr><tr>
<td onmouseover="this.style.background='#000000'" onmouseout="this.style.background=''">
<ilayer><layer onmouseover="this.bgColor='#000000'" onmouseout="this.bgColor=null">
<a href="#" onclick="return false;">&amp;nbsp;Link&amp;nbsp;3&amp;nbsp;</a>
</layer></ilayer></td>
</tr></table>
</div>

</body>
</html>

joh6nn
09-06-2002, 09:15 AM
heh. i thought only Links had mouseover and mouseout events in NS4