Click to See Complete Forum and Search --> : Rotating Script


Pastor
10-05-2005, 03:58 PM
Hey guy's nice forum help.

We have a church site, on the top we have a nice header with some people from our church on them, anyway I was wondering if there was a script out there that would load a new header each time the page was refreshed. I would like to do this on all of my pages, but really on the front page.

thanks
PAstor

Our Site (http://victorylifecenter.org)

David Harrison
10-05-2005, 04:40 PM
Here's a script I made a while ago that should do nicely, however it fades the image in. If you would rather not have it fading in just let me know and I'll cut that bit out.

In this script you just have to make sure that these bits in red match each other: <img src="img1.png" width="256" height="256" alt="Norty Pig" id="banner" />
<script type="text/javascript">
alter("banner");
</script>

tabzter
10-05-2005, 08:41 PM
Doesnt seem to work in Opera. Fine in Mozilla and IE though.

David Harrison
10-05-2005, 09:16 PM
I think you'll find that it works in all browsers, just to different degrees. For example, users with JavaScript disabled will get just the same image every time. Users using Opera will not get the image fading in, because Opera does not support any opacity styles. Users of IE, Moz and Konqueror will see a random image fading in each time.

Edit: Typo.