modestoseller
04-14-2006, 09:22 PM
Hello. I found this script on this site http://www.codetoad.com/dhtml_zooom.asp and I would like to tie it to a random image script that I'm currently using.
---------------------Code below
< script language="JavaScript">
<!--
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="http://www.euronet.nl/users/samirb/beep/cars/001-cars-640.jpg"
myimages[2]="http://www.euronet.nl/users/samirb/beep/cars/002-cars-640.jpg"
myimages[3]="http://www.euronet.nl/users/samirb/beep/cars/003-cars-640.jpg"
myimages[4]="http://www.euronet.nl/users/samirb/beep/cars/004-cars-640.jpg"
myimages[5]="http://www.euronet.nl/users/samirb/beep/cars/005-cars-640.jpg"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img width=300 height=500 src="'+myimages[ry]+'" border="0">')
}
random_imglink()
//-->
< /script>
-----------------code above-----------------
I have tried diffrent variations and I have not had any luck to get them to work together.
Can anyone help me on this one please.
Thanks.
---------------------Code below
< script language="JavaScript">
<!--
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="http://www.euronet.nl/users/samirb/beep/cars/001-cars-640.jpg"
myimages[2]="http://www.euronet.nl/users/samirb/beep/cars/002-cars-640.jpg"
myimages[3]="http://www.euronet.nl/users/samirb/beep/cars/003-cars-640.jpg"
myimages[4]="http://www.euronet.nl/users/samirb/beep/cars/004-cars-640.jpg"
myimages[5]="http://www.euronet.nl/users/samirb/beep/cars/005-cars-640.jpg"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img width=300 height=500 src="'+myimages[ry]+'" border="0">')
}
random_imglink()
//-->
< /script>
-----------------code above-----------------
I have tried diffrent variations and I have not had any luck to get them to work together.
Can anyone help me on this one please.
Thanks.