Log in

View Full Version : Random banner issue on refresh


killerford
10-23-2012, 12:34 PM
So I've asked someone about this for my forum. I'm wanting to go back to using one theme only but making it so a different image shows when he refreshed the page due to me owning a clan since 2008 I would like all of our games that we support to keep showing. He's linked me to this site: http://csscreator.com/node/1328

He then goes on to say this:

The ID for the vBulletin banner is called Header so you would this code

var thediv=document.getElementById("header");

Is he talking about this code?

<script type="text/javascript"> window.onload=function(){ var thediv=document.getElementById("yourid"); var imgarray = new Array("imageone.gif", "imagetwo.gif", imagethree.gif"); var spot =Math.floor(Math.random()* imgarry.length); thediv.style.background="url("+imgarray[spot]+")"; } </script>

And where would I need to put this code? And I also see the imageone images ect but does this go on the URL's or do I need to upload the banners into my FTP?

Lynne
10-23-2012, 04:00 PM
You should be asking your questions in that modification thread.