View Full Version : Image rotation?
Hi,
I was wondering if any script exists that works basically like a random banner rotator. I would like to design a feature for my page that allows me to put 10 pictures to a folder and then let one of the pictures be picked (from the folder) randomly and then shown at my web site. As I said, basically like an advertisment rotator that loads a new graphic when ever you refresh the web site.
Thanks for your help.
Occi
Goldilocks
04-09-2003, 10:34 AM
How about this one: http://www.a1javascripts.com/miscellaneous/bannerrotator/bannerrotator.html
thanks goldi, that one is already quite good. but it randomly changes the image after a certain time rather then when refreshing the browser window. and that is what i was looking for originally - a script that displays a random image (out of a folder) when ever your refresh the browser. maybe you have another source for me?
thanks.
DarkStreetDev
04-13-2003, 08:40 AM
I have the ideal code for you, but unfortunately it is part of a commercial application I am creating. I am sure you can modify the script above by removing the timer events and call up the function using the onLoad function in the <body>tag of the document.
Thanks for the advice. I will try that, though I am not really got with scripts ;-). If you however can send me your script I would be very thankful. Of course I wouldn't use it for any commercial project.
Rigrunner
04-21-2003, 11:38 AM
You want it in java script or php or something else?
I'm not good at explaining things through but ive put up a file for php random images & random text ive commented it as much as i thought was needed but if you have any more questions mail me (im not always on this board)
You can find the php script here
http://www.rigz.org/randomimage.txt
ive got a random button script in javascript you can find here
http://www.rigz.org/randombutton.txt
if those dont suit you there's other ways to do it aswell mail me letsgosurff@hotmail.com and ill help if you need it.
That's excellent. Thanks for that. I will write you an email if I need any further help.
Cheers.
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.