dFilter | JavaScriptSource


Dwayne Forehand Mar 28, 2003
This script will easily allow you to add an input mask to a textbox. The mask for a phone number could look like this for example "(###) ###-####". Just give it a try to see it in action!

The JavaScript Source: Forms: dFilter

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!


Did you use this script?  Do you like this site?  Please link to us!

Leave a Response


For the Num Lock case, need to correct the dFilter.js code for the following.... if (key47&&key95&&key

Gery Aug 22, 2013

There is a bug in the script that makes letters appear instead of numbers if you use the numeric keypad. It is easy to fix adding the following if (key95) { key=key-48; } After line 42 else if ( ((key47&&key95&&key

Nacho Jan 8, 2013