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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Nov 2004
    Location
    near the only active volcano in the continental US
    Posts
    409
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Need Help with Mouseover Issue

    I am working with a mouseover image script and trying to use it in conjunction with an imagemap. being somewhat new to scripting, I am wondering if such is even possible, and if so, what I might be able to do to get this script running. I tried it in IE and got absolutely nothing for my efforts and Mozilla doesnt seem to be reacting to it either. I realize I have probably missed something very basic in it, I have a tendency to do that once in a while, but any help or ideas on how to get this working would be greatly appreciated. The basic idea is to change the appearance of the image based on where the mouse is at while being able to use areas of the image as links. All the images are the same in appearance and shape save for one small portion. I was pretty sure I had it covered based on my experience with previous image mouseover action, but either I have missed something or I am trying to do something that is impossible with javascript, but I am not entirely sure.


    <script language="javascript">

    function loadpix()
    {
    weover=new Image(276,419)
    weover.src="wolfeselement.jpg"
    reover=new Image(276,419)
    reover.src="ravenelement.jpg"
    geover=new Image(276,419)
    geover.src="greasonelement.jpg"
    seover=new Image(276,419)
    seover.src="sashaelement.jpg"
    deover=new Image(276,419)
    deover.src="dorienelement.jpg"
    }

    function filter(imagename,objectsrc)
    {
    if (document.images)
    document.images[imagename].src=eval(objectsrc+".src")
    }

    </script>

    </head>

    <body bgcolor="#000000" leftmargin="0" topmargin="0" onLoad="loadpix()">
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td>
    <center>
    <img src="wolfeselement.jpg" name="rgsd" border="0" width="276" height="419" ISMAP USEMAP="#rgsdmap">
    <map name"rgsdmap">
    <area href="raven.html" shape="circ" coords="76,70,40" onmouseover="filter('rgsd','reover')" onmouseout="filter('rgsd','weover')" alt="Raven Nightwolfe">
    <area href="greason.html" shape="circ" coords="200,341,40" onmouseover="filter('rgsd','geover')" onmouseout="filter('rgsd','weover')" alt="Greason Nightwolfe">
    <area href="sasha.html" shape="circ" coords="76,341,40" onmouseover="filter('rgsd','seover')" onmouseout="filter('rgsd','weover')" alt="Sasha Nightwolfe">
    <area href="dorien.html" shape="circ" coords="200,70,40" onmouseover="filter('rgsd','deover')" onmouseout="filter('rgsd','weover')" alt="Dorien Nightwolfe">
    <area href="main.html" shape="rect" coords="34,149,244,263" alt="The Family">
    </map>
    Last edited by greasonwolfe; 11-01-2004 at 01:21 PM. Reason: to clarify problem/title

  • #2
    Regular Coder
    Join Date
    Nov 2004
    Location
    near the only active volcano in the continental US
    Posts
    409
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Well, I solved the problem. It helps to have the "=" sign in there when I am naming the map to be used. If one of the moderators would be kind enough to delete this string so as to not have it taking up space. . .

    Greason


  •  

    Posting Permissions

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