Results 1 to 4 of 4

Thread: Image Swapping

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Location
    London, England
    Posts
    213
    I want to use the image swap method. When I put my cursor over the text the image changes. However, when I take away the cursor I want the image to return to the original image.

    Can someone show me how to code this please ?

    nmretd.

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    <IMG SRC=BACKGRND.GIF onmouseover="this.src='cloud.gif'" onmouseout="this.src='backgrnd.gif'">

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Location
    London, England
    Posts
    213
    Thanks, that works fine. One more question if I may:

    I am using the following code:

    <html>
    <head>
    <title>Image Swapping Example</title>
    </head>
    <body>
    <h1>Image Swapping</h1>

    <IMG SRC=ms.GIF onmouseover="this.src='bb.gif'" onmouseout="this.src='ms.gif'"

    </body>
    </html>

    How can I modify this so that the image changes when I put my mouse over a Hyperlink (next to the image) and goes back to the original image when I take the mouse away ?

    nmretd.

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    for the ONMOUSEOVER/ONMOUSEOUT event for the link, change the source of the picture (document.myImage.src='somefile.gif')

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width