Image Rollover Stuff - HTML Noob!

by simmonsmike7 4 replies
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 :p

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
#main internet marketing discussion forum #html #image #noob #rollover #stuff
Avatar of Unregistered
  • Profile picture of the author gxd5
    <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>
    {{ DiscussionBoard.errors[684684].message }}
  • Profile picture of the author simmonsmike7
    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?
    Signature
    EverTrust Media is the leading digital marketing agency.
    {{ DiscussionBoard.errors[684922].message }}
  • Profile picture of the author gxd5
    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>
    {{ DiscussionBoard.errors[684976].message }}
  • Profile picture of the author UcDog
    i had leave u a pm ... pls reply me asap ty
    {{ DiscussionBoard.errors[2729757].message }}
Avatar of Unregistered

Trending Topics

  • 54 {{ upvoteCount | shortNum }}

    Better/cheaper solution than Mailchimp?

    Hi all, I have an e-commerce on Squarespace and I make my own product (jewelry). I want to start building an email list in order to promote 1 great offer ... [read more]

  • 5 {{ upvoteCount | shortNum }}

    Whats the Best Way To Sell Domain Names?

    As Above. I have a portfolio of premium domain names that I would like to sell. I've used Flippa in the past, with little success; the fees tend to prevent ... [read more]

  • 55 {{ upvoteCount | shortNum }}

    Are you the Warrior of the Month?

    so.....we are launching the Warrior of the Month mini competition... Yes... every Month we will announce who was the Warrior with the most valuable post. This is our own small ... [read more]

  • 9 {{ upvoteCount | shortNum }}
  • 6 {{ upvoteCount | shortNum }}

    Any Alternative Of Hootsuite?

    Pr1nc3 in Social Networks

    Suggest me some website or tool like Hootsuite. Free tool or website would be appreciate.. Thanks in Advance.