OnClick JavaScript Event
<A HREF="Top/faqs.htm" TARGET="main" onMouseover="document.faq.src='Pics/faqs2.gif';" OnMouseout="document.faq.src='Pics/faqs.gif';" onClick="document.faq.src='Pics/faqs3.gif';" return true;>
<IMG NAME="faq" SRC="Pics/faqs.gif" BORDER=0></A><BR>
This is the code I have for the page. Unfortunately, the onClick command is not working properly. Whenever the button is clicked on, it does change to the faq3.gif, but does not return to faqs.gif until a mouseout event occurs. Is there any way to get the faqs3.gif picture to revert to the faqs.gif picture when the left mouse button is released for an onClick?
AndyB posted this at 20:19 — 9th February 2000.
They have: 344 posts
Joined: Aug 1999
You might want to take a look at
http://webhome.idirect.com/~bowers/testing/begin.htm
it's a demonstration of mouseOvers, mouseOuts, clicked images, in a framed environment, etc.
That may be of use to you
Malte posted this at 20:24 — 9th February 2000.
They have: 297 posts
Joined: Apr 1999
Looking at your code the behavior is correct. WHat is that you want to hapen onClick?
Malte
Uther posted this at 20:27 — 9th February 2000.
They have: 6 posts
Joined: Sep 1999
Well I'd like to have the button "glow" when highlighted by the mouse and then "depress" when clicked on. The URL is http://www.titan.iwu.edu/~econ
AndyB posted this at 21:58 — 9th February 2000.
They have: 344 posts
Joined: Aug 1999
If you want two different images for mouseOn and mouseOff as well as a third 'clicked' image that stays clicked .... that's exactly what my demo does
Uther posted this at 16:26 — 10th February 2000.
They have: 6 posts
Joined: Sep 1999
Well, I looked at your tutorial, and I believe that the effects of your page are not similar to what I desire. This is becaude I would like the onClick command to return to the original pic after the click has been executed. If there were a command similar to onDepress, then things would be just ducky. I could also be missing something in your tutorial; any information regarding this would be appreciated.
Malte posted this at 18:47 — 10th February 2000.
They have: 297 posts
Joined: Apr 1999
What about onMouseDown and onMouseUp?
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.