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
    New Coder
    Join Date
    Oct 2002
    Location
    Oakland, CA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    onmouseover error

    Hi,

    I'm trying unsuccessfully to implement an onmouseover effect that changes not only the image that's being rolled over, but another one on the page.

    The error says "Expected (" (semicolon), which I can't seem to correct.

    As you can tell I'm new to Javascript, so any help would be greatly appreciated!

    Here's my code:

    <head>
    <script LANGUAGE="JavaScript" type="text/javascript">

    e100=new Image(275,219);
    e100.src="/images/diabloleft.jpg"
    e200=new Image(274,206);
    e200.src="images/office.jpg"
    e101=new Image(275,219);
    e101.src="images/diabloright.jpg"
    e201=new Image(274,206);
    e201.src="images/office.jpg"

    function filter(imagename1,objectsrc1,imagename2,objectsrc2)
    {
    document.images[imagename1].src=eval(objectsrc1+".src");
    document.images[imagename2].src=eval(objectsrc2+".src");
    }

    </script>
    </head>

    <body>
    <table>
    <tr>
    <td><a href="feat3.asp?CID=BA6" onmouseover="filter('e300','e100','e400','101')" onmouseout="filter('e300','e200','e400','e201')">
    <img src="images/office.jpg" NAME="e300"></td>

    <td><img src="images/pixel.gif" width="5"></td>

    <td><a href="about.htm">
    <img src="images/office.jpg" NAME="e400"></td>
    </tr>
    </table>



    Any ideas?
    Thank you,
    Mark

  • #2
    New Coder
    Join Date
    Oct 2002
    Location
    Oakland, CA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Oops, my bad!

    Posting to my own submission here... but a typo issue was causing my problem!

    Thanks anyways,
    Mark


  •  

    Posting Permissions

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