Hi, I'm having a little issue with a masked input with jquery:
I have a phonenumber text input, so I masked it with a little plugin that I got from this site:
Masked-Input-Plugin by Digitalbrush
It's so usefull to mask inputs with non-complex rules, so I used this rule to mask my phonenumber input:
$("#txtHomePhoneNumber").mask("(99) 999-99 99");
Now the problem is when I want to let the user enter two type of phones on the same input, for example, the user can enter a phone number like this:
(02) 222 - 22 - 22
As well as:
(02) 222 - 22 - 2
Now, how should I concatenate this two rules, so that the masked input keeps formatting the input textbox (adding the dashes and parentheses)?
If you know another way or another plugin that could let me get what I want (even if it's without using this plugin), please let me know.
Thanks in advance.