onKeyPress

Arguments

eventKeyboardEvent Object

An object that contains information about the keyboard event, such as the key that was pressed. The properties available to you in this object are defined and set by the client's browser.

Description

This event fires when the user types a character in an editable field.

Discussion

The onKeyPress event fires when the user presses a key on the keyboard that produces a character value, such as a letter, number, or punctuation. Keys that do not produce a character, such as shift and alt, will not trigger the onKeyPress event.

The event fires after the onKeyDown event. You can add Action Javascript, custom JavaScript, or sever-side Xbasic to execute one or more actions to this event.

For more information about keyboard events, see Mozilla's documentation on KeyboardEvents or the developer documentation for your favorite web browser.

See Also