Allows only valid characters (i.e. numbers) to be typed into a text box. Can take negative numbers and a decimal point. You can supply a callback that runs when focus is lost and the value in the text box is not a valid number.
Disabling pasting does not work under all browsers (fine in IE), so this feature has been removed. The old version is still available though (if anyone can figure out how to prevent paste in all browsers).
Limitations / Bugs
Does not validate (best left for another script)
- Cannot make the number negative if there is already text inside the input box