PDA

View Full Version : Random Banner



SaishuHane
11-21-2006, 10:22 PM
I was reading through old posts and found this

[QUOTE=zeropsi;46984]You could try this:
Javascript:


function banner() {

banner = array();
number = 0;
// bannerArray
banner[number++] = ""; //banner_info
banner[number++] = ""; //banner_info
increment = Math.floor(Math.random() * number);
document.getElementById('banners').innerHTML = banner[increment];
}


but i dont quite know where to put in different numbers and filenames. im trying to get it, as the topic suggests, to change banners randomly as you navigate my forums (forums in question http://z10.invisionfree.com/Jahs_vision_of_Love/index.php?act=idx )

is this the best way to go about it? or is there a better way?

VatsaL
11-23-2006, 04:42 PM
Well I dont know about this one, but you can try this one, which looks pretty simple to me:
http://jscode.com/js_random_image.shtml,

or even other billions of random image scripts out on the web:
http://www.google.com/search?q=random+image+script