hey guys,
do any of you know the simpliest code to a banner rotation which switches in a given span of time?
I use this code:
<script language="JavaScript">
<!--
/*
Random Image Link Script- By JavaScript Kit(http://www.javascriptkit.com)
Over 200+ free JavaScripts here!
Updated: 00/04/25
*/
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="http://cute-spot.com/site-decor/advert-images/ad-banners/ad-banner1.gif"
myimages[2]="http://cute-spot.com/site-decor/advert-images/ad-banners/ad-banner2.gif"
myimages[3]="http://cute-spot.com/site-decor/advert-images/ad-spot2.gif"
//specify corresponding links below
var imagelinks=new Array()
5
imagelinks[1]="http://rexangel.pixelbee.net"
imagelinks[2]="http://www.creamycafe.lefteelicious.com"
imagelinks[3]="http://cute-spot.com/advertising.html"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'" target="_blank"'+'><img src="'+myimages[ry]+'" border=0></a>')
}
random_imglink()
//-->
</script>
</body>
</html>
but it only shows a different banner every time the page is reloaded, so i put in an automatic page reload on the same page.
Now my layout is Iframes, and basically, it works fine....
my problem is, it doesn't only reload that Iframe, but the whole page/window >_<
I tried googling "automatic page reload script" on google, but i haven't yet met one that's as organized & simple as the code that i am using above.
thank you.

I use this code:
<script language="JavaScript">
<!--
/*
Random Image Link Script- By JavaScript Kit(http://www.javascriptkit.com)
Over 200+ free JavaScripts here!
Updated: 00/04/25
*/
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="http://cute-spot.com/site-decor/advert-images/ad-banners/ad-banner1.gif"
myimages[2]="http://cute-spot.com/site-decor/advert-images/ad-banners/ad-banner2.gif"
myimages[3]="http://cute-spot.com/site-decor/advert-images/ad-spot2.gif"
//specify corresponding links below
var imagelinks=new Array()
5
imagelinks[1]="http://rexangel.pixelbee.net"
imagelinks[2]="http://www.creamycafe.lefteelicious.com"
imagelinks[3]="http://cute-spot.com/advertising.html"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'" target="_blank"'+'><img src="'+myimages[ry]+'" border=0></a>')
}
random_imglink()
//-->
</script>
</body>
</html>
but it only shows a different banner every time the page is reloaded, so i put in an automatic page reload on the same page.
Now my layout is Iframes, and basically, it works fine....
my problem is, it doesn't only reload that Iframe, but the whole page/window >_<
I tried googling "automatic page reload script" on google, but i haven't yet met one that's as organized & simple as the code that i am using above.
thank you.

Comment