PDF In-Depth

Forms - Using event.change

February 04, 2001

Advertisement
Advertisement
 

A question appeared on one of the discussion lists involving how to emulate one of those stupid Department-of-Motor-Vehicle sort of forms where you have a little square box for every letter of your name, and you can fit only one character to a box. The person asking about this wanted to know how to set it up so that the cursor would jump immediately to the next field after the user typed a single character.

The obvious answer is that you set up this retarded SAT-exam type of form by using one little-bitty square text field per letter, then use some kind of script to make the cursor jump to the next field as soon as a key is hit. The key to making this kind of script work is to do it as a custom keystroke filter (Field Properties:Format:Custom, then the bottom Edit button). The other key to making it work is that the form should be running under version 4.05 of Reader or Acrobat so you can use the setFocus() method. When you want to force a jump to field 'b', you just do:

getField('b').setFocus();
PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Quick PDF Library

Get products to market faster with this amazing PDF developer SDK. Over 900 functions and an equally...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.