/    Sign up×
Community /Pin to ProfileBookmark

Image swap question (easy I guess)

Hi

I just downloaded following script at javascript.internet.com. Instead of clicking the small pics to get the fullsize, I would like the big picture to display, if I just rollover the small pic. How can this be done? Check out the script:

<!– TWO STEPS TO INSTALL AUTO-RESIZABLE-POP-UP:

  • 1. Copy the coding into the HEAD of your HTML document

  • 2. Add the last code into the BODY of your HTML document –>
  • <!– STEP ONE: Paste this code into the HEAD of your HTML document –>

    <HEAD>

    <SCRIPT LANGUAGE=”JavaScript”>

    <!– This script and many more are available free online at –>
    <!– The JavaScript Source!! [url]http://javascript.internet.com[/url] –>

    <!– Begin
    function CaricaFoto(img){
    foto1= new Image();
    foto1.src=(img);
    Controlla(img);
    }
    function Controlla(img){
    if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
    }
    else{
    funzione=”Controlla(‘”+img+”‘)”;
    intervallo=setTimeout(funzione,20);
    }
    }
    function viewFoto(img){
    largh=foto1.width+20;
    altez=foto1.height+20;
    stringa=”width=”+largh+”,height=”+altez;
    finestra=window.open(img,””,stringa);
    }
    // End –>
    </script>

    </HEAD>

    <!– STEP TWO: Copy this code into the BODY of your HTML document –>

    <BODY>

    <div align=”center”>
    <TABLE BORDER=”1″ cellspacing=3>
    <TR>
    <TD align=left>
    <A HREF=”javascript:CaricaFoto(‘/img/auto-resizable-pop-up/lg-1.gif’)” BORDER=”0″>
    <IMG SRC=”/img/auto-resizable-pop-up/1.gif” BORDER=”0″></A>
    </TD>
    <TD align=center>
    <A HREF=”javascript:CaricaFoto(‘/img/auto-resizable-pop-up/lg-2.gif’)” BORDER=”0″>
    <IMG SRC=”/img/auto-resizable-pop-up/2.gif” BORDER=”0″></A>
    </TD>
    <TD align=right>
    <A HREF=”javascript:CaricaFoto(‘/img/auto-resizable-pop-up/lg-4.gif’)” BORDER=”0″>
    <IMG SRC=”/img/auto-resizable-pop-up/4.gif” BORDER=”0″></A>
    </TD>
    </TR><TR>
    <TD colspan=3>
    <DIV ALIGN=”CENTER”>Click for zooming the image at it’s real dimensions…</DIV>
    </TD>
    </TR>
    </TABLE>
    </div>

    <p><center>
    <font face=”arial, helvetica” size”-2″>Free JavaScripts provided<br>
    by <a href=”http://javascriptsource.com”>The JavaScript Source</a></font>
    </center><p>

    to post a comment
    JavaScript

    1 Comments(s)

    Copy linkTweet thisAlerts:
    @KingCobra220Nov 02.2006 — I think you could change &lt;A HREF="javascript:CaricaFoto('/img/auto-resizable-pop-up/lg-4.gif')" BORDER="0"&gt;
    &lt;IMG SRC="/img/auto-resizable-pop-up/4.gif" BORDER="0"&gt;&lt;/A&gt;

    to
    &lt;A HREF="javascript:void(0)" onMouseOver="CaricaFoto('/img/auto-resizable-pop-up/lg-4.gif')" BORDER="0"&gt;
    &lt;IMG SRC="/img/auto-resizable-pop-up/4.gif" BORDER="0"&gt;&lt;/A&gt;


    or better yet
    &lt;IMG SRC="/img/auto-resizable-pop-up/4.gif" onMouseOver="CaricaFoto('/img/auto-resizable-pop-up/lg-4.gif')"&gt;

    I'm not sure it will work :o , but I had to try, right?
    ×

    Success!

    Help @Jeepster spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.8,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...