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 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    rollover script not working...

    I'm a beginner at all this...
    my rollover script needs to preload all the images.
    the table displays 4 small images and one large image. when you clikc on each small image the large image needs to be replaced with the corrct large image.

    the script i tried worked for netscape 4.7 and 7.0.
    but it does not work with IE 6 for some reason.

    can anyone tell me why? or show my a better way to do this?

    Here is my code....

    <script language=javascript type="text/javascript">
    <!-- hide script from old browsers
    if (document.images)
    {

    svv01lg = new Image
    svv01lg.src = "images/svv/svv_lg_01.jpg"
    svv02lg = new Image
    svv02lg.src = "images/svv/svv_lg_02.jpg"
    svv03lg = new Image
    svv03lg.src = "images/svv/svv_lg_03.jpg"
    svv04lg = new Image
    svv04lg.src = "images/svv/svv_lg_04.jpg"

    }
    else
    {
    svv01lg = ""
    svv02lg = ""
    svv03lg = ""
    svv04lg = ""

    document.svvImage =""
    //end hiding script from old browsers -->
    </script>

    <table cellspacing="1" cellpadding="0" border="0" align="center">
    <tr>
    <td rowspan="4"><img src="images/svv/svv_lg_01.jpg" alt="" width="188" height="159" border="0" name="svvImage"></td>
    <td><a href="javascript:void(0)" onClick="document.svvImage.src=svv01lg.src"><img src="images/svv/svv_sm_01.jpg" alt="" width="59" height="39" border="0"></a></td>
    </tr>
    <tr>
    <td><a href="javascript:void(0)" onClick="document.svvImage.src=svv02lg.src"><img src="images/svv/svv_sm_02.jpg" alt="" width="59" height="39" border="0"></a></td>
    </tr>
    <tr>
    <td><a href="javascript:void(0)" onClick="document.svvImage.src=svv03lg.src"><img src="images/svv/svv_sm_03.jpg" alt="" width="59" height="39" border="0"></a></td>
    </tr>
    <tr>
    <td><a href="javascript:void(0)" onClick="document.svvImage.src=svv04lg.src"><img src="images/svv/svv_sm_04.jpg" alt="" width="59" height="39" border="0"></a></td>
    </tr>
    <tr>
    <td colspan="2" class="bluelightbg">&nbsp;</td>
    </tr>
    </table>
    }

  • #2
    New Coder
    Join Date
    Aug 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    partly fixed.. but i still have a question...

    okay actually... i partly fixed it. i removed the href="javascript:void(0);"

    line from each image a tag. the onclick works now.
    but i still need to have the hand shpw up when you move the mouse over each small image...


    Can i do that with no href?

  • #3
    Regular Coder
    Join Date
    Apr 2003
    Location
    Atlanta, GA
    Posts
    487
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <style type="text/css">
    a img {
    cursor: hand;
    }
    </style>


  •  

    Posting Permissions

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