Masking input text for phone #, date, etc.
843835Dec 25 2001 — edited Nov 4 2009Hi All,
This may not be related to jsp, but since I am using it, I decided to post here.
I have a jsp page which is basically a form to enter some database data.
What I would like is to force the user to enter correct data such as phone number, fax number, date, using a mask in the input type = "text" name = ...
eg.
phone (03)9876-1234
phone: (xx)yyyy-zzzz
The same applies for date:
DD/MM/YYYY
Can we somehow initialise the value of the text with brackets and dashes, so the user is forced to enter the data in a pre-format
When the user presses submit, I capture the value of the text using request.getParameter(...
Thanks in advance for any help