View Full Version : Banner rotation script help..

07-23-2009, 01:18 AM
Guys, can someone please tell me what I'm doing wrong. When viewed in browser I get a blank page. Thanks

<SCRIPT language=JavaScript>

var img_width = "640";
var img_height = "360";
var img_title = "Click Here";

var links=new Array();
var pic=new Array();

//insert here your images src
pic[0]=<img src="images/IMGA0257.JPG" width="640" height="360" />;
pic[1]=<img src="images/IMGA0264.JPG" width="640" height="360" />;

//insert here your links

var xy=Math.floor(Math.random()*ad.length);//generates a random //digit and then makes it a whole number
document.write('<a href="'+links[0]+'" target="_blank"><img src="'+pic[0]+'" width="'+img_width+'" height="'+img_height+'" alt="'+img_title+'"></a>');

07-23-2009, 02:52 PM
Just to clarify,
What type of banner rotating script are you after?
Auto change or single/random image on page load?