hi all,
Does anyone know why this script would not work in Netscape4.7 with the images in <div>'s?
[A portion of the <head> script]
over=new PreloadImages(20,'nav2_images/butovr','.gif')
norm=new PreloadImages(20,'nav2_images/but','.gif')
function Iswap(num){
if(document.images)
eval('document.images["norm'+num+'"].src='+'over[num].src')
}
function Iback(num){
if(document.images)
eval('document.images["norm'+num+'"].src='+'norm[num].src')
}
[The image script]
<td><a href="javascript:;" onMouseOver="Iswap(1)" onMouseOut="Iback(1)"><img src="nav2_images/but1.gif" name="norm1" border="0" width="155" height="15"></a></td>
Works in IE, but NN displays an error saying that the document.images has no properties. It is referring to eval line of the <head> script.
This script works as long as the images aren't inside of <div> tags but I need them there.
Thanks
Jason
Does anyone know why this script would not work in Netscape4.7 with the images in <div>'s?
[A portion of the <head> script]
over=new PreloadImages(20,'nav2_images/butovr','.gif')
norm=new PreloadImages(20,'nav2_images/but','.gif')
function Iswap(num){
if(document.images)
eval('document.images["norm'+num+'"].src='+'over[num].src')
}
function Iback(num){
if(document.images)
eval('document.images["norm'+num+'"].src='+'norm[num].src')
}
[The image script]
<td><a href="javascript:;" onMouseOver="Iswap(1)" onMouseOut="Iback(1)"><img src="nav2_images/but1.gif" name="norm1" border="0" width="155" height="15"></a></td>
Works in IE, but NN displays an error saying that the document.images has no properties. It is referring to eval line of the <head> script.
This script works as long as the images aren't inside of <div> tags but I need them there.
Thanks
Jason