Typical Uses? Perhaps you simply want to direct your readers to a different site each day of the week. Or maybe you run a daily newsletter that might require readers to go to a specific file depending on the day of the week.
Downloading and Using WhereToday
To use the applet: download it, place it in an appropriate location, add the applet tag to your document, configure the day file and please add this line to your page.
Make sure the file WhereToday.class after downloading is 3717 bytes in size. Also make sure your server is configured to serve .class files as MIME type application/octet-stream.
People typically place applets in a classes directory at the same level as the HTML document for which the applet is being served from. This implies configuring the applet tag with a value of codebase equal to classes and code as WhereToday.
The applet tag for the above applet looks like:
<applet codebase="classes" code="WhereToday" width=64 height=24> <param name=file value="days/days.txt"> <font size=-1>You will need a Java capable browser to view this applet</font> </applet>You must specify the width and height of the applet exactly according to the size of the images you are using.
Set up the configuration file (e.g. days.txt) as follows:
parameter URL1 URL2Where parameter is default, monday, tuesday, wednesday, thursday, friday, saturday or sunday. URL1 is the relative or absolute URL to go to when the user clicks on the image, and URL2 is the relative or absolute location of the image to display. The default parameter must be in the first line of the file. Relative URLs are relative to the document in which the applet is placed.
The configuration file location must be relative to the document in which this applet appears.
A configuration file might look like (or download the example configuration for the above applet):
default http://www.conveyor.com/ default.gif Monday space.html space.gif FRIDAY http://twentyone-11.org/Note that only two days are specified and that case is not important. If the reader were to visit this applet on a day other than Monday or Friday they would end up at the default location. Furthermore, the Image URL is not required providing a default image URL is specified.
If you use this applet, please place the following line at the bottom of your page (feel free to reduce the font size in order to remain compatible with your page!):
This applet is Freeware, no warranty is implied in any sense. Use at your own risk
More applets can be found here!
The Internet Conveyor Ltd.
<font size=-1>WhereToday applet (c) <a href="http://www.conveyor.com/">
The Internet Conveyor Ltd.</a></font>
Let me know where you are using the applet so I can set up a page of links. Questions or comments to: John Criswick by e-mail to criswick@conveyor.com.