RapidWeaver FAQ - Random text or images (or random anything else)







Share/Bookmark


How can I have a photo, some text, links or anything else changing on pageload so every time the page is reloaded the image or text changes randomly?



Chapter 1: Random
Chapter 2: Random with refresh button



Chapter 1: Random


Try reloading this page a few times and you will see that this photo here will change at random or shuffle each time you reload the page...



Same for this text...



Of course the more possibilities you add in the code the higher the probability it will display something else every time the page is loaded.

Having a photo, some text, links or anything else which changes every time the page is loaded is really easy. The good thing is that to visitors visiting your website from time to time it will look like you updated the website since the last time even if you didn’t. For more regular visitors it’s nice to have something changing from time to time. Also you can use it to point people to different pages randomly since every image or text can be linked to a particular page if you want (different photo galleries, pages you recently updated and more).


How this is done is described in
my RapidWeaverFAQ.org E-Book (sample)

Chapter 2: Random with refresh button


This example here features mixed contents and a Refresh button. Instead of only displaying other content when reloading the page this also displays different content when hitting Refresh without reloading the entire page.




RapidWeaverFAQ.org - Tutorials, Tips & Tricks is made with RapidWeaver and for RapidWeaver.
It's an EBookStoreToday.com company. It's presented by Cédric Giger and hosted by HostGator.com

Thank you for visiting and supporting my website,
- Cédric -


Now share it…

Share