Adobe acrobat forms javascript object specification User Manual

Page of 64
Acrobat Forms - JavaScript Object Specification
33
Event Object Properties
change
Type: String
Event: Keystroke, Selection ChangeAccess: R/W
This property specifies the change in value that the user has just typed. The change is
replaceable such that if the JavaScript wishes to substitute certain characters, it may.
commitKey
Type: Number
Event: Keystroke, Format
Access: R
Use this property to determine how a form field lost focus. Valid values are:
0 - value was not committed (e.g. escape key was pressed).
1 - value was committed because of a click outside the field using the mouse.
2 - value was committed because of hitting the enter key.
3 - value was committed by tabbing to a new field.
For example, to automatically display an alert dialog after a field has been committed add the
following to the field’s format script:
if (event.commitKey != 0)
app.alert(“Thank you for your new field value.”);
modifier
Type: Boolean
Event: Keystroke, Mouse events Access: R
This property is a boolean that specifies whether the modifier key is down during a particular
event. The modifier key on the Microsoft Windows platform is Control and on the Macintosh
platform is Option or Command. The modifier property is not supported on UNIX.
rc
Type: Boolean
Event: Keystroke, Validate
Access: R/W
This property is used for validation. It indicates whether a particular event in the event chain
should succeed. Set rc to false to prevent a change from occurring or a value from committing.
By default rc is true.
4.0