[thelist] Jscript vs. N4.7

George Palframan george at themidwestgroup.com
Tue Sep 4 04:47:50 CDT 2001


Hi all,
Can anyone tell me why this here script doesn't work in dear old Netscape
4.7. 

Many thanks in advance,
George.

<script language="Javascript">
//Declare global variables
var image,n,m,speed

//Create image array
var swopImg = new Array(3);
swopImg[0] = new Image(424,60);
swopImg[1] = new Image(424,60);
swopImg[2] = new Image(424,60);

//Create url Array
var swopURL = new Array(3);
swopURL[0] = "http://www.fish4ponds.com "
swopURL[1] = "http://www.koifishfarm.net"  
swopURL[2] = "http://www.evolutionaqua.com"

//Create Target Array
var swopTarget = new Array(3)
swopTarget[0] = "_blank"
swopTarget[1] = "_blank"
swopTarget[2] = "_blank"

//Set swop image path for preloading
swopImg[0].src = "images/Fish4ponds-B10850.gif"
swopImg[1].src = "images/Preston-Nurseries-B10722.gif";
swopImg[2].src = "images/Evolutionaqua-B10286.gif"

//Function to choose a random image
// n is the upper limit of the image quantity
// m is lowest 
n = 2
m = 0
image = Math.round(Math.random() * n) + m



function changeGraphic(){
image = image + 1
if (image == 3)
	{image = 0}; 
document.images["flasher"].src = swopImg[image].src;
URL.href = swopURL[image]
URL.target = swopTarget[image]
setTimeout('changeGraphic()',speed)
}

speed = 5500 

</script>




More information about the thelist mailing list