[thelist] [code review] Caps Lock Detection

Tom Dell'Aringa pixelmech at yahoo.com
Fri Aug 8 10:41:10 CDT 2003


--- Joshua Olson <joshua at waetech.com> wrote:
> Hi JS/DOM gurus,
> 
> I have some code that detects caps lock when filling in a form. 
> This may be
> helpful in avoiding telephone calls when someone cannot log in
> because they
> have inadvertently typed in the PW in CALL CAPS.
> 
> Unfortunately it only work on IE.

This is a useful script, even if it ends up being only IE. I see it
as an added benefit for those users. Anyway, question: is this:

if (form.elements.username.value == '' ||
isWhitespace(form.elements.username.value))

The best way to check for empty fields? I have been wondering about
that..

Tom

=====
http://www.pixelmech.com/ :: Web Development Services
http://www.DMXzone.com/ :: Premium Content Author / JavaScript / Every Friday!
http://www.maccaws.com/ :: Group Leader
[Making A Commercial Case for Adopting Web Standards]

"That's not art, that's just annoying." -- Squidward


More information about the thelist mailing list