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

  • 3 {{ upvoteCount | shortNum }}

    5 Articles you need to read this Week About Internet Marketing

    Hey Warriors... welcome to a new week at the Warrior Forum We have some epic articles this week.... and we are super excited with the quality of the content. If ... [read more]

  • 120 {{ upvoteCount | shortNum }}

    Warriors .... Warriors.... what would you like to LEARN?

    Good Morning awesome Warriors... I'm happy to announce that The Warrior Forum is planning to create our first COURSE. Yes... Powered by Warrior Wisdom... yeah!! Made at home. But before ... [read more]

  • 99 {{ upvoteCount | shortNum }}

    How I Sold 985 Copies of an Affiliate Offer in 5 Days (Step by Step)

    When I first started online in 2002, it took me a year to sell 985 copies of anything. These days, I can typically do it in the span of a ... [read more]

  • 1 {{ upvoteCount | shortNum }}

    Ad network where I can precisely choose the ad topic / category

    mikka72 in Ad Networks

    Hi warriors, I am building a website on which it is crucial that I can control which ads appear where. I want very precise control over the category of the ... [read more]

  • 55 {{ upvoteCount | shortNum }}

    1 Billion Dollar - Really ???

    Hey Warriors: Lets' assume you have "1 Billion Dollar" in your bank account. What would you do with this money ? Curious to know your views Cheers, Steve