![]() | | ||||||||
| | #1 |
| HyperActive Warrior Join Date: Sep 2008
Posts: 237
Thanks: 9
Thanked 3 Times in 3 Posts
|
I tried google-ing this stuff for hours but can't find what I am looking for, probably because i am such an HTML noob ![]() Here's what I want to do, it's very simple. I have one image. When someone clicks on that image, another bigger image appears. Both images are different files, so its not just enlarging the first one, its showing a new image when the old one is clicked. I used to know how to do this, but I forgot the code - thank you in advance if someone helps me out |
| | |
| | #2 |
| HyperActive Warrior Join Date: Oct 2006 Location: , , .
Posts: 161
Thanks: 22
Thanked 70 Times in 27 Posts
|
<script language="Javascript"> <!-- if (document.images) { button2 = new Image button2.src = 'img2.gif' } //--> </script> <a href="" onClick="document.clickme.src=button2.src"><img src="img1.gif" border=0 name="clickme"></a> |
| | |
| | |
| | #3 |
| HyperActive Warrior Join Date: Sep 2008
Posts: 237
Thanks: 9
Thanked 3 Times in 3 Posts
|
hey man that worked well but what happens is it only shows the 2nd image for a quick second and then the second image goes away. you have to click the 1st image again for the 2nd one to appear, and only for a quick second. is there a way to make the second image stay and not go away within 1 second? |
| | |
| | #4 |
| HyperActive Warrior Join Date: Oct 2006 Location: , , .
Posts: 161
Thanks: 22
Thanked 70 Times in 27 Posts
|
My bad, I just threw that up without testing it. Here is a one line version that I have tested in Firefox 3: <img onClick="this.src='two.jpg';" src="one.jpg" border=0> |
| | |
| | |
| | #5 |
| Warrior Member Join Date: Oct 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
i had leave u a pm ... pls reply me asap ty
|
| | |
![]() |
|
| Tags |
| html, image, noob, rollover, stuff |
| Thread Tools | |
| |
![]() |