Initial Caps - CAPS & Other
Form Field Validation Scripts
This started when I began to re-write a program that was originally done in Turbo Pascal. My clients have been using it since 1991, but with the advent of Windows, we find ourselves "left behind" and we're not able to make use of any Windows functionality like printers, PDF files, etc.
So, after much pondering on how to do this, I have decided to re-write the whole thing in PHP using the apache web server on a Linux box as the server side. This gives me access to mySQL, PHP and tons of other power that we all make use of every day.
For the client side - the users simply use their favorite browser software - again something we all know how to use - this alone flattens the learning curve tremendously.
This is a very inexpensive system that can be installed on an older, slower computer. My Linux box is running a hardened version of Debian Sarge on a AMD K62-450 MHz with 256M of RAM. Debian Linux is a great way to go and I have this system set up to do automatic updates of the core code, so basically, I don't do much but check it daily, look at the logs, etc.
My biggest problem with using a web server is the whole concept of waiting until a form is submitted to find out that something in the data is incorrect.
There are many ways to validate data - some programmers wait until form submission and validate all fields, others wait until the data hits the server side and use PHP to validate, or it can be done on-the-fly.
IMHO, things like range checking, field formatting and modification should be done as soon as the client leaves a field - do it while that information is fresh on the user's mind - and if the data is not acceptable, don't let the user leave that field.
So, on-the-fly is my choice for my definition of a good user interface. In a client/server environment, this means some client side processing has to be available. And that is where JavaScript comes in real handy. Porting my tried and true routines from Pascal to JavaScript is all it takes.
Anyway - I digressed there a bit. These scripts are for things I wrote back in the 1980s and have used in all my programs as part of my definition of how/why a program's user interface should look and feel. Some are validation routines, others are what I call 'user interface improvement' routines.
Initial Caps - this to me is a user interface improvement script. Why should a user have to capitalize the first letter of a name, or address, or city. This little routine will capitalize the first letter following a space or period. It could be enhanced to honor other characters as well.
CAPS - this is a real simple routine that converts all letters in a field to UPPER case - great for state abbreviations.