Nieuw lid |
|
Hoi, ik gebruik momenteel het volgende script:
<script language="JavaScript1.4" defer="defer" type="text/javascript">
var quote=new Array(2)
var url=new Array(2)
quote[1] = "http://url/map/uploads/banners/advertentie.gif";
url[1] = "http://url/map/adverteren.php";
quote[2] = "http://url/map/uploads/banners/12145487.gif";
url[2] = "http://url/map/uit.php?bannerID=1";
function andereBanner( ) {
var blaat = Math.round(Math.random()*1);
document.getElementById("banner").src = quote[blaat];
document.getElementById('url').href = url[blaat];
setTimeout( 'andereBanner()' , 6000 );
}
</script>
<script language="JavaScript1.4" defer="defer" type="text/javascript"> quote[1] = "http://url/map/uploads/banners/advertentie.gif"; url[1] = "http://url/map/adverteren.php"; quote[2] = "http://url/map/uploads/banners/12145487.gif"; url[2] = "http://url/map/uit.php?bannerID=1"; function andereBanner( ) { var blaat = Math .round(Math .random ()*1); document.getElementById("banner").src = quote[blaat]; document.getElementById('url').href = url[blaat]; setTimeout( 'andereBanner()' , 6000 ); } </script>
Dit werkt goed:) Alleen 1 fout, ik heb er 2 banners in zitten, maar als 3e geeft die dit als output: 'undefined' terwijl die nergens in zit, weet iemand hoe dit kan?
B.v.d. Gr jeffrey
|