Click to See Complete Forum and Search --> : random banner ad


metrosoccer12
10-01-2003, 07:57 PM
i need a code that does random banner ads.. i tried one but it wouldnt let me use the ads by google thing like javascript.. anyway does anyone know a code for this?

pyro
10-01-2003, 09:19 PM
You could try something like this:

<script type="text/javascript">
ads = new Array("ad1.gif", "ad2.gif", "ad3.gif"); //array of your images
document.write('<img src="'+ads[Math.floor(Math.random()*ads.length)]+'" alt="rotating image">');
</script>

metrosoccer12
10-02-2003, 05:32 AM
yeah but on of the codes im using is a javascript banner

pyro
10-02-2003, 07:29 AM
huh? :confused: