View Full Version : rollover script not working...

06-11-2003, 09:37 PM
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"

svv01lg = ""
svv02lg = ""
svv03lg = ""
svv04lg = ""

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

<table cellspacing="1" cellpadding="0" border="0" align="center">
<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>
<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>
<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>
<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>
<td colspan="2" class="bluelightbg">&nbsp;</td>

06-11-2003, 09:45 PM
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?

06-11-2003, 10:30 PM
<style type="text/css">
a img {
cursor: hand;