As per title, can someone point my in the right direction on how to achieve this.
Thanks.
Rotating images in Ad manager - Advertisement Management
-
- Registered User
- Posts: 163
- Joined: Fri Feb 21, 2014 12:21 pm
- Location: Chelmsford UK
Re: Rotating images in Ad manager
sorted by adding more than one banner in the same location.
-
- Registered User
- Posts: 163
- Joined: Fri Feb 21, 2014 12:21 pm
- Location: Chelmsford UK
Re: Rotating images in Ad manager
The javascript below works well.
Code: Select all
<script language="JavaScript">
<!-- Ad code goes here -->
<!--
function random_adlinks(){
var adimages=new Array()
//specify random images below. You can have as many as you wish
adimages[1]="http://path.to.image"
adimages[2]="http://path.to.image"
adimages[3]="...............f"
//specify corresponding links below
var adlinks=new Array()
adlinks[1]="http://ad.link"
adlinks[2]="http://ad.link"
adlinks[3]="........."
var adtext=new Array()
adtext[1]="Ad text."
adtext[2]="Ad text"
adtext[3]="................"
a.
var ry=Math.floor(Math.random()*adlinks.length)
if (ry==0)
ry=1
document.write('<center>'+'<a href='+'"'+adlinks[ry]+'"'+'><img src="'+adimages[ry]+'" border=0></a>'+'<br />'+''+adtext[ry]+''+'</center>')
}
random_adlinks()
//-->
</script>
<!-- Ad code goes here -->
My sig should go here... but I've nowt so say
-
- Registered User
- Posts: 145
- Joined: Wed Jul 30, 2003 7:44 pm
- Location: Menorca