Wonder if anyone knows what's going on here...
I have a page which is generated via Perl that prints a number of data entries in a series of table rows. Each <tr> is assigned a unique id through perl, and when user mouseovers on each individual <tr>, the javascript is to change the background color to a "highlighted" color. The problem is THIS...
in IE 7 (not tested with other versions of IE), the first 4 rows do NOT perform action when mouseover occurs in <td 1>, <td 2>, or <td 3>. Then, it becomes a little quirky in row 5 when mouseovering in the aforementioned <td>'s. Then, after that, it works fine. Mozilla/Firefox works flawlessly throughout.
JS code:
<script language="javascript">
<!--
//id is unique id assigned to each tr, so we know what tr to alter
function doHighlight(id)
{
document.getElementById(id).style.backgroundColor = '#9FFFD7';
}
//color is predetermined tr background color to return to
function doNormal(color,id)
{
document.getElementById(id).style.backgroundColor = color;
}
//-->
</script>
Perl-generated HTML Code:
<tr id="$rowcounter" align=center class="$rowcolor" onMouseOver="doHighlight('$rowcounter');" onMouseOut="doNormal('$offcolor','$rowcounter');">
<td align=center class="tds">$enumber</td>
<td align=center class="tds">$div[0]</td>
<td align=center class="tds">$rightdate</td>
<td align=center class="tds">$div[2]</td>
<td align=center class="tds">$div[3]</td>
<td align=center class="tds">$pm\$<font color=$redgreenblack>$f_amt</font></td>
<td align=center class="tds"><font size=1><a href="mm.cgi?op=TOP&temp=edit&id=$div[1]" target="topwin">Edit</a></font></td>
<td align=center class="tds"><input name="numbers" type=checkbox value="$div[4]"><input type=hidden name="op" value="$js_op"></td>
</tr>
Wondering if anyone has encountered this or has a clue what is going on here.
Thanks,
Derek