SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2000
    Location
    France
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hope you can help.
    I have 7 links that need an image to change on hover. I can get it to work for the first, but not for the rest. The code I'm using is:
    ---------------------------------------
    <script language="JavaScript">
    <!-- Hide the script from old browsers --
    img0_on = new Image(50,50);
    img0_on.src="change.gif";
    img0_off = new Image(50,50);
    img0_off.src="load.gif";
    function over_image(parm_name)
    {
    document[parm_name].src = eval(parm_name + "_on.src");
    }
    function off_image(parm_name)
    {
    document[parm_name].src = eval(parm_name + "_off.src");
    }
    // End Hiding Here -->
    </script>

    Then: <IMG SRC="load.gif" name="img0">
    ---------------------------------------
    However, I've tried adding img1 etc etc with different src but disables the whole function.
    Thanks in advance.

  2. #2
    SitePoint Zealot HotDog's Avatar
    Join Date
    May 2000
    Location
    Salt Lake City, UT
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Joe Eliason
    Just a dog learnin' PHP from cat.


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
  •