PDA

View Full Version : table problem


Alias
11-06-2002, 07:43 PM
Hello

I have table wich changes background color onMouseOver ...
<table name="tname" onMouseOver="this.style.backgroundColor='#6F7578'" onMouseOut="this.style.backgroundColor='#B4B4BC'" width="100" border="0" cellspacing="0" cellpadding="0" height="50" bgcolor="#B4B4BC"><tr><td>&nbsp;</td></tr></table>

How to change background color of table on mouse over the image ???

something like ...
<img src="../bmp.gif" onMouseOver="tname.style.backgroundColor='#6F7578'" width="30" height="30" align="absmiddle">
but this don't works ...

Best Regrads
Vladimir

(IE only)

beetle
11-06-2002, 08:23 PM
First, the table needs an id, like...

<table id="tname">

Second, you need to access it using that ID

<img src="../bmp.gif" onMouseOver="document.getElementById('tname').style.backgroundColor='#6F7578'" width="30" height="30" align="absmiddle">

Alias
11-06-2002, 10:34 PM
Thank You Beetle !!! :thumbsup: