PDA

View Full Version : Display different images based on time of day




masterapple04
Nov 1, 2006, 08:51 PM
I'm not much of a programmer, so I've come on bended knee with the hopes that someone knows where I could get a bit of code (I'm thinking Javascript) to do this.

I's designing a page on which I'd like an different image to load based on the time of day. For example, if the site is loaded from 5am to 12pm, I want an image that says "Good morning!" and so on for other time periods during the day.

Any help would be really appreciated!



stoid
Nov 1, 2006, 08:57 PM
I'm really rusty on my javascript, but I know that what you want to do is possible. It'll depend on the user's clock being set correctly, but it can be done.

iMeowbot
Nov 1, 2006, 09:03 PM
There is a simple prefab example you can play with at about.com (http://javascript.about.com/library/bltod1.htm).