View Single Post
Old 08-02-2004, 02:56 PM  
daveylapoo
Confirmed User
 
Join Date: Dec 2003
Posts: 423
something like this that i could change to update daily instead of every pageload:


function banner() {
};

banner = new banner();
number = 0;

// bannerArray
banner[number++] = "<a href='http://www.url1.com' target='_blank'><img src='images/banner-1.gif' border='0'></a>"
banner[number++] = "<a href='http://www.url2.com' target='_blank'><img src='images/banner-2.gif' border='0'></a>"
banner[number++] = "<a href='http://www.url3.com' target='_blank'><img src='images/banner-3.gif' border='0'></a>"
banner[number++] = "<a href='http://www.url4.com' target='_blank'><img src='images/banner-4.gif' border='0'></a>"
banner[number++] = "<a href='http://www.url5.com' target='_blank'><img src='images/banner-5.gif' border='0'></a>"
// keep adding items here...

increment = Math.floor(Math.random() * number);

document.write(banner[increment]);

thanks in advance
daveylapoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote