New Image Each Hour

Script by Joe Burns

     The script puts up a different image depending on the hour of the day. When someone logs into your page, the computer reads the hour. It takes the number and adds ".jpg" and displays it.

     For example, if it's 8AM, then "8.jpg" will be displayed. If it's 10 at night, then "22.jpg" will be displayed. You see, JavaScript reads in military time. Get it?

     It stands to reason, then, that to get this to work, you would require 24 images. You do. If you only want three or so to rotate, just save the same images under different names. Save 6 versions of the same picture named "1.jpg" through "6.jpg," etc., etc. Simple enough. If you wish to use .gif images instead of JPEG, you will need to go into the script and everywhere it reads ".jpg" you'll need to change to ".gif"

     I do not have the script on this page as I don't have enough images. Just make sure when you use this script that the images are in the same directory as the page that is calling for them.

Grab the Script

     Please note: This script is being offered in simple text format. When you click to Grab the Script, the text should display. Internet Explorer and AOL users may get a blank page or the script may run and produce the effect. If this happens, choose SAVE AS from the FILE menu and save the blank or compiled page.

Back to the Image Scripts