Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Question

  1. #1
    New to the CF scene
    Join Date
    Oct 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    How do you change an image to another image when the mouse is over the image that will be changed?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    644
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #3
    New to the CF scene
    Join Date
    Nov 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thi might help

    <img onMouseover= src="image to change to.*" width="90" height="73" alt= "This picture" onMouseout= src='main image.*' src='main image.'>

    i have used this in html a few times the * is for the image extension such as gif/jpg/bmp/ect

  • #4
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    heres another easy way:
    <a onMouseOver="document.Image.src='Button(2).gif'"
    onMouseOut="document.Image.src='Button(1).gif'">
    <IMG SRC="Button(1).gif" BORDER=0 NAME="Image"></a>

    this works fine and is pretty simple, you need to change "Image" tho for more than one mouseover.

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    644
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've had problems with:

    image.src="pic.jpg"

    with mozilla, always found it best to use:

    image.setAttribute("src","pic.jpg");

  • #6
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by x_goose_x
    I've had problems with:

    image.src="pic.jpg"

    with mozilla, always found it best to use:

    image.setAttribute("src","pic.jpg");
    aah thanks


  •  

    Posting Permissions

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