1 Banner Jumble? Tue Mar 30, 2010 5:23 am
Matti
Registered Member
this is the script you guys have post it here for banner jumble but I can't figure out where the image of the banner goes! can you tell me where can I put the url of the banner...
- Code:
<SCRIPT LANGUAGE="JavaScript">
var theImages = new Array()
//Random-loading images
theImages[0] = 'IMAGE URL 1'
theImages[1] = 'IMAGE URL 2'
theImages[2] = 'IMAGE URL 3'
theImages[3] = 'IMAGE URL 4'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
if(whichImage==0){
document.write('<a href ="link.html"><img src="'+theImages[whichImage]+'" border=0 width=452 height=181></a>');
}
else if(whichImage==1){
document.write('<a href ="link.html"><img src="'+theImages[whichImage]+'" border=0 width=452 height=181></a>');
}
else if(whichImage==2){
document.write('<a href ="link.html"><img src="'+theImages[whichImage]+'" border=0 width=452 height=181></a>');
}
else if(whichImage==3){
document.write('<a href ="link.html"><img src="'+theImages[whichImage]+'" border=0 width=452 height=181></a>');
}
else if(whichImage==4){
document.write('<a href ="link.html"><img src="'+theImages[whichImage]+'" border=0 width=452 height=181></a>');
}
}
</script>
<script>showImage();</script>