Mrleone
09-20-2005, 12:59 PM
Hey guys!
I use this script on my site for banners and pics to rotating:
<script language="JavaScript">
<!--
/*
Random Image Link Script- By Website Abstraction(http://www.wsabstract.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://www.yoursite.com/pics/pic.jpg"
myimages[2]="http://www.yoursite.com/pics/pic.jpg"
myimages[3]="http://www.yoursite.com/pics/pic.jpg"
//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]="http://www.yoursite.com"
imagelinks[2]="http://www.yoursite.com"
imagelinks[3]="http://www.yoursite.com"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a>')
}
random_imglink()
//-->
</script>
The only problem is, I want all the sites to open in a new window..
I try to ad an "blank" code in the html codes but then all my links in the site opens in a new window.. I want only the urls in this rotating code to open..
How?
Thanks in advance!
I use this script on my site for banners and pics to rotating:
<script language="JavaScript">
<!--
/*
Random Image Link Script- By Website Abstraction(http://www.wsabstract.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://www.yoursite.com/pics/pic.jpg"
myimages[2]="http://www.yoursite.com/pics/pic.jpg"
myimages[3]="http://www.yoursite.com/pics/pic.jpg"
//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]="http://www.yoursite.com"
imagelinks[2]="http://www.yoursite.com"
imagelinks[3]="http://www.yoursite.com"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a>')
}
random_imglink()
//-->
</script>
The only problem is, I want all the sites to open in a new window..
I try to ad an "blank" code in the html codes but then all my links in the site opens in a new window.. I want only the urls in this rotating code to open..
How?
Thanks in advance!