
July 22nd, 2004, 03:42 PM
|
|
Contributing User
|
|
Join Date: Jun 2004
Posts: 149
Time spent in forums: 2 Days 14 h 19 m 25 sec
Reputation Power: 5
|
|
It's fairly messy, but this is what I attempted to do, and it doesn't work proper. Where change() and change2() are, use to be hard-coded colors.
PHP Code:
echo '<tr onmouseover="setPointer(this, \''.$row_count.'\', \'over\', \''.$row_color.'\', \'change()\', \'change2()\');" onmouseout="setPointer(this, \''.$row_count.'\', \'out\', \''.$row_color.'\', \'change()\', \'change2()\');" onmousedown="setPointer(this, \''.$row_count.'\', \'click\', \''.$row_color.'\', \'change()\', \'change2()\');">';
Code:
<script language="javascript" type="text/javascript">
function change() {
this.className="bgcolor1";
}
function change2() {
this.className="bgcolor2";
}
</script>
CSS Code is the following:
Code:
.bgcolor1 {
background-color: #83a9be;
}
.bgcolor2 {
background-color: #E54340;
}
|