Results 1 to 4 of 4

Thread: Change Image Source

  1. #1

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650

    Change Image Source

    I am using two images (one for the menu title, and one for the menu when it is dropped down). What I want is that when the mouse runs over a certain menu option another menu pulls out to the left of it. I dont thnk i explained tis to well, if anyone needs more then please ask. Well I tried putting an onmousover in the image map's area tag, but that did nothing. So then I tried using the onmousemove in the same place. This caused the image to show an empty source. I checked several times and the source is indeed there. Does anyone know what I am doing wrong?

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    If you just want to swap images...

    Code:
    <head>
        <script type="text/javascript">
            <!--
                function swap(s, t) {
                    if (window.document.images) {
                        window.document.images[s].src = t;
                    }
                }
            //-->
        </script>
    </head>
    Use:

    Code:
    <img name="img1" src="a.gif" onMouseOver="swap('img1', 'b.gif');" onMouseOut="swap('img1', 'a.gif');">
    Something like that.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    That works for the dropping of the full menu, but i need a side scroll out menu (kind of like a third level menu in vb).

  4. #4
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    That isn't a simple matter of changing an image source.

    It's some sort of scripting, perhaps dhtml.

    Check out some script sites

    www.javascripts.net etc

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