Entering dates on forms via the web. For something that should be so simple this is, more often than not, a troublesome area. It would probably be a whole lot easier if the whole world stuck to using the same format but then wouldn't that make it boring!?
There are all sorts of weird and wonderful solutions to picking dates available for you to download on the web. Some are easy to use, some aren't. Some are fool-proof, some aren't. In any case the best thing for the user is probably to give them something they are used to and that is as simple as possible. In the case of Notes this would be the date-picker widget as shown in the screen-shot below.
Surprisingly, for an in-built feature of Notes, this is quite easy to use and intuitive.
However, this isn't one of the widgets that Iris have deemed important enough to convert in to a "web-feature" as of yet. No need to wait for them though as Brendon Upson of webWise Network Consultants has beaten them to it with his own Date-Picker Java Applet.
Take a look at the "date" field below. Notice the small grey square next to it. This is the applet. Click on it to bring up the calendar and choose a date. The applet then calls a simple JavaScript function to update the value in the field.
Date of Birth: |
Parameter | Value |
field | "BirthDate" (in this case) |
datemask | @ReplaceSubstring(@Text(@Date(2000; 12; 31); "D0S0"); "31" : "12" : "2000"; "dd" : "MM" : "yy") |
title | "Date of Birth" |
function jsDatePicker( szField, szDate, szAction){Note: This function wouldn't be necesary if the applet were signed as that would give it full access to the page. The drawback is that signing the applet would mean that you had to accept its signature when it loaded. Hence the author wisely decided not to.
var form = document.forms[0];
var field = form.elements[szField];
if(szAction == "1"){
field.value=szDate;
}
return field.value;
}
Copyright © 2000 - 2024 Jake Howlett of Rockall Design ltd. This article was printed from codestore.net