K
KDawg44
Hi,
I am trying to change the background of a row onMouseOver and it is
not working. I am not a javascript expert so I am sure i a missing
something...
here is my code. The first part is the html generated by PHP and the
second is the javascript function.
PHP/HTML:
<table border = 1 width = '15%' cellpadding = 0 cellspacing =
0><tr><td class = 'regText' onClick = 'showAppointment(" . $queryDay .
", " . $queryMo . ", " . $queryYr . ");'
onMouseOver='highlightItem(this);' onMouseOut='highlightItem(this);'
align = 'middle'>"
JavaScript:
function highlightItem(item) {
if (item.bgcolor == '#FF00CC') {
item.bgcolor = 'gray';
} else {
item.bgcolor = '#FF00CC';
}
}
I don't get any errors in the error console but no colors change.
Thanks.
Kevin
I am trying to change the background of a row onMouseOver and it is
not working. I am not a javascript expert so I am sure i a missing
something...
here is my code. The first part is the html generated by PHP and the
second is the javascript function.
PHP/HTML:
<table border = 1 width = '15%' cellpadding = 0 cellspacing =
0><tr><td class = 'regText' onClick = 'showAppointment(" . $queryDay .
", " . $queryMo . ", " . $queryYr . ");'
onMouseOver='highlightItem(this);' onMouseOut='highlightItem(this);'
align = 'middle'>"
JavaScript:
function highlightItem(item) {
if (item.bgcolor == '#FF00CC') {
item.bgcolor = 'gray';
} else {
item.bgcolor = '#FF00CC';
}
}
I don't get any errors in the error console but no colors change.
Thanks.
Kevin