View Full Version : Hyperlink Help
jesse679
03-19-2005, 10:38 PM
I'm trying to figure out a code to do this and I was wondering if anyone here just knows the code at all.
I'm using a image as a hyperlink and on mouseover I want a different image to appear and then when the link is clicked, I want to to show a different image.
Thanks in advance!
IKLOP
03-19-2005, 10:59 PM
this should do it<img src="image.jpg" onmouseover="this.src='imageover.jpg'" onmouseout="this.src='image.jpg'" onclick="this.src='imageclick.jpg'">
jesse679
03-19-2005, 11:40 PM
It won't work in IE or Firefox. And onclick isn't working.
<img src="images/nav/home_red.jpg" onmouseover="this.src='images/nav/home_black.jpg'" onmouseout="this.src='images/nav/home_red.jpg'" onclick="'images/nav/home_green.jpg'">
IKLOP
03-19-2005, 11:54 PM
onclick should be onmousedown, my mistake.
jesse679
03-20-2005, 12:01 AM
Nope, it's not onmousedown.
Edit:
<img src="images/nav/bio_red.jpg" onmouseover="this.src='images/nav/bio_black.jpg'" onmouseout="this.src='images/nav/bio_red.jpg'" onmousedown="'images/nav/bio_green.jpg'">
_Aerospace_Eng_
03-20-2005, 10:56 AM
try this
<a href="#"
onmouseover="image1.src='images/nav/bio_black.jpg'"
onmouseout="image1.src='images/nav/bio_red.jpg'"
onclick="image1.src='images/nav/bio_green.jpg';return false">
<img name="image1" src="images/nav/bio_red.jpg" style="border:0px;"></a>
jesse679
03-20-2005, 10:22 PM
The mouseover stuff works now, but the huperlink doesn't.
<a href="bio.htm"
onmouseover="image1.src='images/nav/bio_black.jpg'"
onmouseout="image1.src='images/nav/bio_red.jpg'"
onclick="image1.src='images/nav/bio_green.jpg';return false">
<img name="image1" src="images/nav/bio_red.jpg" style="border:0px;" width="81" height="55"></a>
_Aerospace_Eng_
03-20-2005, 10:27 PM
take out "return false" from the onclick stuff and the link will work
jesse679
03-21-2005, 05:44 PM
Okay, it works now. Thanks for all your help. My problem with the images working on my computer and not the internet has been fixed due to my FTP client going on a capitalizing rampage (.jpg to .JPG).
Thanks again!
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.