PDA

View Full Version : onClick


Fraki
9-5-03, 02:39 PM
I'm working on a menu for a website, and I have it so when the mouse is over the menu, it changes to another image, but i also want it to change to a third image when it's clicked, is there any way of doing so?

This is how it is with just the mouseOver:

<A HREF="#" onMouseOver="document.fees.src='layout/menu/fees.jpg'"onMouseOut="document.fees.src='layout/menu/feesoff.jpg'" style="cursor:hand;" onfocus="this.blur()">
<IMG SRC="layout/menu/feesoff.jpg" BORDER=0 NAME="fees" alt="Fees"></a>

This is how I tried to add the onClick effect

<A HREF="#" onMouseOver="document.fees.src='layout/menu/fees.jpg'"onMouseOut="document.fees.src='layout/menu/feesoff.jpg'"onClick="document.fees.src='layout/menu/photos.jpg'" style="cursor:hand;" onfocus="this.blur()">
<IMG SRC="layout/menu/feesoff.jpg" BORDER=0 NAME="fees" alt="Fees"></a>

Croc Hunter
9-6-03, 12:34 AM
Best to do that with flash Fraki. If you use swish I can send you an example.

Fraki
9-6-03, 12:53 AM
Hm, I'd prefer not to use flash... I don't mind not having the effect, it was kind of just bonus lol but if someone does figure out how to get the onClick effect without flash, post away!

thanks Croc

Croc Hunter
9-6-03, 01:09 AM
Here's a tutorial http://www.carto.net/papers/svg/samples/mouse_over_effects.shtml