<script type="text/javascript"><!--
/* random banner
- open source */
var images = []; var n = 0;
images[n++] = 'Image URL 1';
images[n++] = 'Image URL 2';
images[n++] = 'Image URL 3';
var r = Math.floor(Math.random() * images.length);
document.getElementsByTagName('img').item(0).src = images[r];
//-->
</script>
Can someone please convert the random banner code please?![]()
Edit: and once it is open source can someone please make it so that it wont show the same image twice in a row?
It already works.As for the repeating thing.There isn't much you can do.
no it don't work all the way, it doesn't put the images in the boards logo cell like it is suppose to, it put the images right on top of that
http://deluxeanimeforum.vforums.co.uk/
go there and refresh it till you see the image and see for yourself.
Hmm.Thats right.I forgot proboards has the banner on the left and I coded my forum to be like that.We'll,i'll see what I can do.
Use this for now...
Can't make it NOT show the image twice sorry!![]()
Code:
- <script type="text/javascript"><!--
- /* random banner
- - open source */
- var images = []; var n = 0;
- images[n++] = 'Image URL 1';
- images[n++] = 'Image URL 2';
- images[n++] = 'Image URL 3';
- var r = Math.floor(Math.random() * images.length);
- get('welcome_table','id').getElementsByTagName('img')[0].src = images[r];
- //-->
- </script>
its ok, and thanks that should work, but is there a way to make it seems as if it load with the rest of the forum and not after it? It looks tacky seeing it appear after the rest of the forum finishes loading.
The exact solution I was about to use.Well,Wrighty beat me to it.
its ok, and thanks that should work, but is there a way to make it seems as if it load with the rest of the forum and not after it? It looks tacky seeing it appear after the rest of the forum finishes loading.
Put it at the very top of your global header.![]()
yay ty
yay ty
No worries.![]()