Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Image Swap

  1. #1
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    I am looking for an images swap script which will change an image when the mouse is placed over an imageready hotspot and then reverted back to the original when taken off it. Could somebody help me out or point me in the direction of a similar script please.

    thanks
    JR

  2.  

  3. #2
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    i have done it so nevermind.
    JR

  4. #3
    Junior Member
    Join Date
    Feb 2003
    Location
    maine, usa
    Posts
    1
    Member #
    657
    well maybe you could share how?

  5. #4
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    here...
    <a href="http://www.whatever.com" onMouseOver="document.enter.src='images/blue.gif';" onMouseOut="document.enter.src='images/temp3_03.gif';"><IMG SRC="images/temp3_03.gif" WIDTH=94 HEIGHT=26 ALT="" name="enter" border="0"></a></TD>
    have a look at this, if you have any probs just post a reply.
    JR

  6. #5
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Just remember to preload them.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  7. #6
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    what is the best code to use to do this?
    JR

  8. #7
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    For each image:
    Code:
    someimage = new Image();
    someimage.src = "url";
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  9. #8
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    in the head or body? does this have to have <script language=javascript>tags around it?
    JR

  10. #9
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Head and yes although technically it should be
    Code:
    <script type="text/javascript">
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  11. #10
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    I find the preloading of images works faster as part of a separate JaveScript (.js) file that is called from the head of the document e.g.

    Code:
    <SCRIPT TYPE="text/javascript" SRC="(your script.js)">
    <!--
    -->
    </SCRIPT>
    In the JavaScript file, you have the two lines filburt posted earlier for calling each new image.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:55 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com