|
PHP2Go Javascript Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--InputMask
Defined in inputmask.js
| Field Summary | |
Number |
caret
Used to catch the field's caret position |
Boolean |
ctrl
Used to catch ctrl key |
Object |
fld
Form field associated with the mask |
FieldSelection |
fs
Reference to the FieldSelection singleton |
Boolean |
ignore
Used to indicate chars that must be ignored |
String |
lastValue
Last field value |
Mask |
mask
Active mask object |
Boolean |
paste
Used to indicate a paste keyboard command |
Boolean |
pressing
Used to control if a key is being pressed |
Number |
selSize
Used to hold the field's selection size |
Boolean |
shift
Used to catch shift key |
Boolean |
valid
Used to indicate chars that might be accepted |
<static> String |
ignoreCodes
Set of key codes to be ignored: pgup (33), pgdown (34), end (35), home (36), left (37), up (38), right (39), down (40), ins (45), del (127, konqueror), 4098 (shift+tab, konqueror) |
| Constructor Summary | |
InputMask
(<Object> fld, <Object> mask)
The InputMask class is used to apply a mask on a form field. |
|
| Method Summary | |
void
|
addListeners()
Register all event listeners in the field |
void
|
blurHandler(<Event> e)
The blur handler also calls the InputMask.update(), validating the field's value once more against the mask |
void
|
keyDownHandler(<Event> e)
The keydown handler implements the first phase of the masking process: filters the keys that must be ignored, determine if the keystroke is a paste combination and retrieves the current caret position and selection size |
void
|
keyPressHandler(<Event> e)
The keypress handler queries the field mask to determine if the pressed char must be accepted. |
void
|
keyUpHandler(<Event> e)
The keyup handler updates the field value by applying the mask format if the value changed, if a valid char was entered or if a paste command was executed |
void
|
pasteHandler(<Event> e)
The paste handler is used to handle onpaste (IE) and oninput (Gecko) events, updating the field's value by applying the mask format |
void
|
update(<Event> e, <Boolean> isBlur)
Runs the format method of the field mask. |
<static> void
|
setup(<Object> fld, <Object> mask)
Sets up an InputMask instance in a given field |
| Field Detail |
Number caret
Boolean ctrl
Object fld
FieldSelection fs
Boolean ignore
String lastValue
Mask mask
Boolean paste
Boolean pressing
Number selSize
Boolean shift
Boolean valid
<static> String ignoreCodes
| Constructor Detail |
InputMask(<Object> fld, <Object> mask)
fld - Field reference
mask - Mask instance
| Method Detail |
void addListeners()
void blurHandler(<Event> e)
e - Event instance
void keyDownHandler(<Event> e)
e - Event instance
void keyPressHandler(<Event> e)
e - Event instance
void keyUpHandler(<Event> e)
e - Event instance
void pasteHandler(<Event> e)
e - Event instance
void update(<Event> e, <Boolean> isBlur)
e - Event instance, when called from the event handlers
isBlur - Whether the update method was called from the blur handler
<static> void setup(<Object> fld, <Object> mask)
fld - Field reference or id
mask - Mask instance or mask expression that must be parsed
|
PHP2Go Javascript Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||