Problems using Keystroke script for on the fly validation of text fields

Problems using Keystroke script for on the fly validation of text fields

Post by Jpg » Fri, 27 Jul 2001 04:55:04

I use Acrobat 4 to develop forms and have difficulties using the keystroke
script of a text input field.
This field is used to enter a user name.
What I want to do is to (on the fly) check if the value of the field matches
a unique name in a list  and automatically replace  the value by the full
name and even if possible remove the focus on the field.

Part of the script could look like :
string = myFunction ( event.value, event.change );
if (string == "Sm") event.value = "Smith John";

With this code, the field is never modified, exept if I click on another
field (WillCommit is call)

What am I doing wrong? Sould I do in another way?

If anyone can help.

Thank you in advance



1. Getting number of Text fields on the fly

If the text fields are all in the same frame, you can use GetChildren( ) and GetClass( ) methods.

This is the rough idea:

list of windows mywindows = frame.GetChildren

for each window in mywindows
 if window.GetClass == HTMLTextfield

Please click the following link to reply:

2. NetBEUI issue in RRAS

3. Using script to set data fields

4. Advice appreciated urgent......

5. Text Flow field to field? HELP HELP

6. Disable user logins to server except Admin??

7. Using Large Text Fields

8. Autoroute disk letter glitch

9. Rounding errors storing numbers in MySQL text fields using DBI

10. Problem Using PDF on the FLY

11. Keystrokes - Text

12. Creating a field that uses totals other fields?