The December 2006 Blog
send me a comment

SnTT: Keystroke Counting in the Notes Client (Thursday, Dec 28)
[ permalink ] [ GoogleTrack ] [ e-mail me ] [ >> ]

One more Show 'N Tell Thursday post for you, before the year's out. This is a little code I was playing with a few nights ago that allows you to monitor what someone is typing in a field on a form in the Lotus Notes client, as they're typing. You don't have to wait until they exit the field for validation, it happens while they're pressing the keys.

Here's what it looks like:

It works by using JavaScript -- that's right, JavaScript in a Notes client form by golly -- to start a SetTimeout loop when you enter the field, and then it keeps checking every half-second or so as you type. On the web, you'd normally do this with something like the onKeyUp field event, but that's not available on the Notes client so I SetTimeouted instead.

Rather than showing you all the code here (there's really not much, but it takes a little explanation), I'll just let you download the sample database and play with it yourself:

As I mention in the "About" page in the database, you could also use this technique to do things like:

Have fun with it. Happy New Year!

technorati tag: ,