Solved

Problem with jscript mask.

Posted on 2016-08-01
3
158 Views
Last Modified: 2016-08-12
I just stole this code from another page where it works.  I don't get the mask on this page.
test1.php
0
Comment
Question by:breeze351
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
Branislav Borojevic earned 500 total points
ID: 41737923
The script does not work because you did not include the jQuery library and the jQuery Mask plugin in your PHP file.

See this link: https://igorescobar.github.io/jQuery-Mask-Plugin/

Attached is the file you included with added library and the plugin. You will see that it works. You need to increase the character limit to allow full phone number to be entered, because the (,), and - take each 1 character space.

Regards,
test.php
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 41737930
Client-side telephone number validation does not require jQuery any more.  You might want to consider the modern alternative.  There is native HTML5 support for input type="tel" with the pattern attribute.
https://www.w3.org/TR/html-markup/input.tel.html
0
 

Author Closing Comment

by:breeze351
ID: 41754387
Thanks I've been away and haven't had time to close this.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question