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

iWebFAQ.org

iWeb FAQ     Webmaster     Wish List     Guestbook     Forum     E-Books

 

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?

La stessa pagina in italiano                             Die gleiche Seite auf Deutsch
 

Share/Bookmark



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).


This is also used to display a Random FAQ in what I call the "announcements area" at the top of each of my pages.


How this is done is described in my iWebFAQ.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.





Of course instead of Refresh you could type any other text or have an image/button instead.


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




iWebFAQ.org - Tutorials, Tips & Tricks is made with iWeb and for iWeb.

It’s an EBookStoreToday.com company. It’s presented by Cédric Giger and hosted by HostGator.


Thank you for visiting and supporting my website,

- Cédric -


 
 

Share/Bookmark