Click to See Complete Forum and Search --> : Banner Ad Rotation & Linking
stormrevolution
05-20-2003, 07:11 PM
I'm currently using MicrosftFP but there admanagement is crap!
Just wondering if there is a javascript that can rotate adverts also giving each advert a different link.
I want it to change the advert each time the vistor visits the site.
Cheers all ;););)
They're more commonly called, "ads." ;)
<html>
<head><title></title>
<script type="text/javascript">
<!--
var links = new Array("http://yahoo.com/", "http://msn.com/", "http://cnn.com/");
var imgs = new Array("yahoo.gif", "msn.gif", "cnn.gif");
function showAd(){
var rand = Math.floor(3*Math.random());
var link = links[rand];
var img = imgs[rand];
document.write("<a href=\""+link+"\"><img src=\""+img+"\"></a>");
}
// -->
</script>
</head><body>
<script type="text/javascript">
<!--
showAd();
//-->
</script>
</body></html>
havik
05-21-2003, 01:20 AM
You shouldn't repost a thread of the same topic
http://forums.webdeveloper.com/showthread.php?s=&threadid=9904
A javascript banner rotator can be found here:
http://www.google.ca/search?q=javascript+banner+rotator&ie=ISO-8859-1&hl=en&btnG=Google+Search
Havik
That's right. You should not post multiple posts on the same subject. This is considered spamming.
havik
05-21-2003, 08:53 PM
Thanks for backing me up there Jona :D
Havik
Any time, man. Any time. lol ;)