jeanne
06-11-2003, 08: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"
}
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"> </td>
</tr>
</table>
}
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"> </td>
</tr>
</table>
}