The DJClock has proved to be an extremely popular applet
since it was release in 2000. Its popularity stems from being customisable and its ability to synchronise
with a server. Some companies have used the DJClock synchronise the times of offices in different parts
of the world.
The main features of DJClock are listed below. Parameters and images
are used to customise the applet in many ways:
Parameter | Description |
GMTOffset | Timezone (in hours) of the time to display. Leave out '+' sign for positive offsets. Set value to 'user' to display time in User's timezone. Values greater than +/-12 are assumed to be in minutes. |
DSTSetting | The Daylight Saving Time setting for the timezone region. A three digit code for the timezone. Common values are "ECT" for Europe, "EST" for North America. Use AET or ACT for Australia and NZ. Not needed if GMTOffset is set to 'user' or if the location does not use Daylight Saving Time. |
ServerFile | Set this parameter to the URL of a file on your server if you require the time shown to be synchronised with your web server. See below for further details. |
ImageURL | Directory in which to find the digits.gif and bgImage file. Must be a full URL ending with a '/'. |
TimeFormat | The format of the time shown. Use date/time format symbols or the values "Short", "Medium" or "Long". See below for time and date format symbols. If using digits, format symbols must be used, the default is: "hh:mm:ss" (or "hh:mm:ss a" if the digits.gif file has an am/pm symbol). If using a textual time, format symbols or "Short", "Medium" or "Long" can be used, the default is "Medium". |
DateFormat | The format for the date shown. See below for date and time format symbols. Use date/time format symbols or the values "Short", "Medium" or "Long", the default is "Long". |
BorderLightColor | Color of Light side of Border in 6 digit Hex |
BorderDarkColor | Color of Light side of Border in 6 digit Hex |
BorderWidth | Width of the Border. Default value=4 |
BorderStyle | Style of the border. 0=inset/outset, 1=button, 2=step. Default value=0 |
Bgcolor | Background Color in 6 digit Hex |
UseTextTime | Set value to "yes" if clock should show time in Text. |
TimeFontSize | Size of the font showing the time. |
TimeFont | Font of the text showing the time. |
TimeFontColor | Color of the font showing the time in 6 digit Hex |
TimeFontStyle | Style of the font showing the time: "b" for bold, "i" for italic, "bi" for both. |
TimeYPos | Y Position in pixels of the text showing the time. |
ShowDate | Set value to "yes" if date is to be shown. |
DateFontSize | Size of the font showing the date. |
DateFont | Font of the text showing the date. |
DateFontColor | Color of the font showing the date in 6 digit Hex |
DateFontStyle | Style of the font showing the date: "b" for bold, "i" for italic, "bi" for both. |
DateYPos | Y Position in pixels of the text showing the date. |
Message | Text of any custom message to be displayed on the clock. |
MsgFontSize | Size of the font showing the message. |
MsgFont | Font of the text showing the message. |
MsgFontColor | Color of the font showing the message in 6 digit Hex |
MsgFontStyle | Style of the font showing the message: "b" for bold, "i" for italic, "bi" for both. |
MsgYPos | Y Position in pixels of the text showing the message if message is displayed on its own. |
BgImage | Image to be used for background. |
BgStyle | Style used for painting background image. Value: 0=tile, 1=center, 2=stretch. Default value=0. |
StatusMsg | Custom message to put in the Status area when mouse is rolled over applet. Copyright parameter below must be set to enable this. |
Copyright | This must be set to "Copyright (c) 2002 Naeem Malik. All Rights Reserved." in order to set a custom status message using the StatusMsg parameter. Do not include the double-quotes. |
The digits can be customised by replacing the digits.gif file with your own. Many websites exist where you can find a large collection of digits. One of the best websites is http://www.digitmania.com/ .
The image below shows the digits.gif file. All digits must be in the order shown. The
optional colon ':' must follow the '0'. The optional 'am' and 'pm' must follow the colon.
The gif file should contain a comment specifying the width of each image. The comment for
the example gif file is shown below. The first number is the total number of digits in the gif
file. Then follows the point in pixels of the beginning of the first digit. The rest of
the numbers are the points in pixels of the end of each digit. Each number is seperated by
a colon.
Gif file comment:
"13:0:16:30:47:62:79:95:111:127:142:158:166:186:201"
The ServerFile parameter is used to synchronise the time with your webserver.
When this is done, all visitors to your webpage will see the same time regardless of their location or computer time.
You should set the value of this parameter to the URL of a file on your webserver. The applet then uses
the file to read the time from the webserver. The contents of the
file is irrelevant but the file should not normally be part of a website (i.e a file that might be
cached by a browser). You could simply put an empty text file on your server and set the parameter to
its URL, for example, "http://www.mywebserver.com/clock.txt".
The GMTOffset parameter must be specified when using the ServerFile parameter.
All colors are specified in 6 digit Hexadecimal numbers. The format of the colors are: rrggbb where rr is the red component, gg is the green component and bb is the blue component. For example, the color value FF0000 is red because the red number is set to its highest value, FF (255 in the decimal, or base 10, system). Green and blue are set to zero. Similarly, 00FF00 is green and 0000FF is blue.
The following symbols can be used in the DateFormat and TimeFormat paramters to create a
customised display of the date/time. Use single quotes to enter text. For example the following time
format will display "The time is 12:33:46" :
'The time is' hh:mm:ss
The text "Short", "Medium" and "Long" can also be used to display short, medium and long formated
date/time display. The actual format shown is locale dependant.
d | Day in month | d -- 7 dd -- 07 |
D | Day in year | D -- 89 |
F | Day of week in month | F -- 2 |
E | Day in week | E -- Tues EEE -- Tues EEEE -- Tuesday |
w | Week in year | w -- 15 |
W | Week in month | W -- 2 |
M | Month in year | MM -- 09 MMM -- Jul MMMM -- July |
y | Year | yy -- 97 yyyy -- 1997 |
G | Era designator | G -- AD |
K | Hour in AM/PM [0-11] | K -- 0 |
h | Hour in AM/PM [1-12] | h -- 12 |
k | Hour in day [1-24] | k -- 24 |
H | Hour in day [0-23] | H -- 0 |
m | Minute in hour | m -- 45 |
s | Second in minute | s -- 14 |
S | Millisecond | S -- 583 |
a | AM/PM Marker | a -- PM |
Many aspects of the DJClock can be changed on the fly with JavaScript/VBScript. To change the
timezone of applet, set the gmtoffset variable to the new timezone in minutes.
document.djclock.gmtoffset=10*60;
To change the background image of the applet, set the bgImage variable to a new image:
document.djclock.bgImage=document.djclock.getImage(document.djclock.getCodeBase(),"newimage.gif");
To set a new DST value use (where xxx is the new value):
document.djclock.processDST("xxx"); document.djclock.chkDST();
See the Dynamic page for details.
The DJClock is available for free for non-commercial sites.
Click Here to download the DJClock applet.
For commercial sites,
the cost of the applet is US$20 per website.
Click here for instruction on how to order the DJClock. Once ordered, the user can download the
DJClock from the link above. Please use the contact page if you have any questions about
ordering.
All registered users of DJClock are entitled to free technical support by email.
Please use the following email address for support:
support@xanasoft.com