Radiant_Stacie_Fan
06-05-2006, 01:40 AM
I found a code that would show one of the two banners I made randomly. Like, you go to my site and see one banner and then you click "refresh" or come again later and it's the second banner.
Anyway, the code isn't working for my site and I don't know why. Maybe this isn't even the right code since it's for Xanga. *shrugs* What code can I use that will actually work, if this won't?
Here's my code:
<!-- start code provided by createblog.com -->
<script type='text/javascript'>
// random banner/image on every visit by micron
// for more xanga scripts and help go to createblog.com
var image = new Array();
// change this to reflect your set of banners
image[0] = 'http://server6.theimagehosting.com/image.php?img=banner_red1m.jpg'
;
image[1] = 'http://server6.theimagehosting.com/image.php?img=banner_red2m.jpg'
;
var index = Math.floor(Math.random() * image.length);
document.write('<img src='+ ((index == image.length) ? image[image.length-1] : image[index]) +'>');
</script>
Anyway, the code isn't working for my site and I don't know why. Maybe this isn't even the right code since it's for Xanga. *shrugs* What code can I use that will actually work, if this won't?
Here's my code:
<!-- start code provided by createblog.com -->
<script type='text/javascript'>
// random banner/image on every visit by micron
// for more xanga scripts and help go to createblog.com
var image = new Array();
// change this to reflect your set of banners
image[0] = 'http://server6.theimagehosting.com/image.php?img=banner_red1m.jpg'
;
image[1] = 'http://server6.theimagehosting.com/image.php?img=banner_red2m.jpg'
;
var index = Math.floor(Math.random() * image.length);
document.write('<img src='+ ((index == image.length) ? image[image.length-1] : image[index]) +'>');
</script>