PHP2Go Javascript Framework

Class InputMask

Object
   |
   +--InputMask

class 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

caret

Number caret

ctrl

Boolean ctrl

fld

Object fld

fs

FieldSelection fs

ignore

Boolean ignore

lastValue

String lastValue

mask

Mask mask

paste

Boolean paste

pressing

Boolean pressing

selSize

Number selSize

shift

Boolean shift

valid

Boolean valid

ignoreCodes

<static> String ignoreCodes

Constructor Detail

InputMask

InputMask(<Object> fld, <Object> mask)

Method Detail

addListeners

void addListeners()

blurHandler

void blurHandler(<Event> e)

keyDownHandler

void keyDownHandler(<Event> e)

keyPressHandler

void keyPressHandler(<Event> e)

keyUpHandler

void keyUpHandler(<Event> e)

pasteHandler

void pasteHandler(<Event> e)

update

void update(<Event> e, <Boolean> isBlur)

setup

<static> void setup(<Object> fld, <Object> mask)

PHP2Go Javascript Framework

Copyright © 2002-2006 by Marcos Pont
Documentation generated by JSDoc on Sun Oct 7 19:52:10 2007