elitecodex
February 23rd, 2006, 08:40 PM
Hey everyone... I have a table like this
<table style="background-color: #eeeeff;">
<tr style="background-color: #00ff00;">
<td >C1</td>
<td style="background-color: #00ffff;">C2</td>
<td >C3</td>
</tr>
</table>
My problem is that Im trying to highlight the row dynamically using Javascript... in the tr tag... by doing something like this
<tr style="..." onmouseover="this.style='background-color: #ffffff;' " onmouseout="this.style='background-color: #00ff00;' ">
Its not working in either firefox or IE. Im creating a grid dynamically so any of the cells could have additional style tags. I want to keep all the code in the table (ie: no css class names or external javascript functions) if possible.
any ideas? thanks.
<table style="background-color: #eeeeff;">
<tr style="background-color: #00ff00;">
<td >C1</td>
<td style="background-color: #00ffff;">C2</td>
<td >C3</td>
</tr>
</table>
My problem is that Im trying to highlight the row dynamically using Javascript... in the tr tag... by doing something like this
<tr style="..." onmouseover="this.style='background-color: #ffffff;' " onmouseout="this.style='background-color: #00ff00;' ">
Its not working in either firefox or IE. Im creating a grid dynamically so any of the cells could have additional style tags. I want to keep all the code in the table (ie: no css class names or external javascript functions) if possible.
any ideas? thanks.