Hi everyone!
I've got a page where visitors cast votes written mostly in
php with
html (tables, and a little
css). There are two choices the visitor can vote for, and as a little effect, i thought it would be nice if when the visitor moused over their choice, the td background would change from a light blue, to a light green. furthermore, when the visitor clicked on their choice i wanted the td background to change from a light green (cause they placed the mouse over their selection) to an even lighter green.
i can get all of that to happen with this code inside of the td tag:
Code:
onmouseover="this.style.background='url(img/lightgreen.gif)'"
onmouseout="this.style.background='url(img/lightblue.gif)'"
onmousedown="this.style.background='url(img/lightergreen.gif)'"
what i cant get to happen is when the visitor clicks on their choice, because of the onmouseout the color goes back to the light blue.
is there any way that when the user clicks down on their choice, the background of the td stays that lighter green? ive got a very limited knowledge of javascript, and ive been having some trouble trying to explain the effect im looking for to google's search engine.
many thanks in advance!!
