SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Sep 1999
    Location
    East Hartford CT USA
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know how to do a basic mouseover and how to do a mouseover where the change happens in another location, but how do you go about making two images change with one mouseover?

    For instance I have ten square being used as a nav bar and I would like the following to happen when the mouse goes over the square...

    I would like the square itself to change plus in another area of the page I would like an image to change to give a description of what that link does... (this change is immediately following the ten squares)...

    is there an easy way to do this?
    suzielopes@yahoo.com
    http://www.cosas-de-enrique.com
    http://www.vipguestlist.com
    http://members.aol.com/suzielopesdesign/portfolio.htm

  2. #2
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, it's called a JavaScript function.

    Code:
    <html>
    <head>
    <script language="Javascript">
    function change (picurl, picurl2) {
    document.picture1.src = picurl;
    document.picture2.src = picurl2;
    }
    </script> 
    </head>
    
    <body>
    <img src="image2_off.jpg" name="picture2">
    <p>
    <a href="page.html" onMouseOver="change('image_on.jpg','image2_on.jpg");" onMouseOut="change('image_off.jpg')">
    <img src="image_off.jpg" name="picture1" border="0"></a>
    </body>
    </html>
    Try that - replace the image names as needed - the mouseover should change the image it's on top of, as well as the one at the top of the page.

    If you need me to walk you through it a bit more, let me know.

  3. #3
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    suzie...view source on this page and it will give you the script and the way to use it.

    http://www.chalcedony.com/javascript.../script07.html

    This online help page came with a book that I bought.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  4. #4
    SitePoint Member
    Join Date
    Oct 2000
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This might help out.Take a look here:

    http://www.pageresource.com/jscript/jhover2.htm

    kc


  5. #5
    SitePoint Member
    Join Date
    Sep 1999
    Location
    East Hartford CT USA
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you guys are the best.. Thank you so very much!
    suzielopes@yahoo.com
    http://www.cosas-de-enrique.com
    http://www.vipguestlist.com
    http://members.aol.com/suzielopesdesign/portfolio.htm


Bookmarks

Posting Permissions

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