Javascript Clocks

I have received an email pointing me to Kurt Grigg's JavaScript Page. Evidently the original script came from his "Silly Clock 3." He allows people to use his scripts for free as long as they make the proper attribution. Visit his page, there are many many clever scripts there! To contact him write javascript.dhtml@virgin.net. Thanks to Ruth Ann for locating the original script!

Some time in February of 2002 I received a clock file as an email attachment. It was frustrating to me because the people who could view it said it was wonderful, and it wouldn't work on my system (Outlook Express on a PowerMac). I tinkered around with it until I got something that would run in the window of a web browser. Here is the original clock file.

What you should see is a clock with the date rotating around the outside, the hands in the right place for your local time, and a second hand ticking around appropriately. The clock hovers about an inch to the right of the cursor, and when you sweep the cursor across the screen, the clock swirls along following it. The file works in all versions of Internet Explorer that I have tried, and in Netscape Communicator. The current version appears not to work in Netscape 6.0 for Macintosh -- probably because of dialect differences in the version of Javascript used. There is a similar problem with WebTV. I have recently started using an Apple Powerook G4. These clocks work on Explorer, but not in Netscape 7.1 or Safari. I'm using OS X on the laptop and once again there must be java mismatches.

I thought it might be interesting to make a few modifications to the file, so here it is without the text. If you want to just leave the clock running, make a small window in your browser, a couple of inches square, put your cursor in to get the clock going, and gently slide your cursor off to the left, out of the window. As long as your cursor doesn't cross the small window the clock will stay there and continue to run.

the slightly modified clock.

This is a BIG clock, and this is a -little- clock.

And here it is with the days and months in German

German Clock, Java-Uhr.

This one is French:

French Horloge

And this one is Italian:

Italian clock

Here is one in Spanish:

Spanish clock

The Polish clock lacks diacritical marks -- can't do 'em in Java AFAIK:

Polish clock

Since I've figured out how to set the font to "Symbol" this is working much better, and I don't need to apologize for it. Thanks to Richard Frankel for suggesting improvements to my Greek.
The Greek clock:

Greek clock


If you can get into the javascript it's easy to make the clock twice as big, or make it float below the cursor instead of to the right, just change parameters here and there. It's an intriguing little file. Congrats to Kurt Grigg for writing it.

I should point out that this whole thing is a reverse-engineering exercise for me. I am trying to learn enough Javascript to understand how this thing works, and what I've done above amounts to a little tinkering with obviously changeable parameters. So just about everything I know is here in this file. I also seem to get a lot of email about the clock, so be warned I may not reply if you write. If you wish to contact me write to Frank Deis, deis@rci.rutgers.edu

Some other Java Clock pages, i.e. different clocks:

Updated May 29, 2002