Alright I know exactly what you’re missing/doing wrong.
You need 3 files, The three I am using in my example are:
test.html
jquery.js
maskedinput.js
Explanation of each:
Test.html – is our HTML page that holds the code needed to call the javascript.
jQuery.js – is the jQuery library, which the Masked Input Library is based off of (You Are Missing This Library)
maskedinput.js – Is the Masked Input library
My Code For test.html is:
<!DOCTYPE html PUBLIC ”-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859–1” />
<title>JQuery test</title>
<script src=“jquery.js” type=“text/javascript”></script>
<script src=“input.js” type=“text/javascript”></script>
<script type=“text/javascript”>
jQuery(function($){
$(”#date”).mask(“99/99/9999”);
});
</script>
</head>
<body>
<form action=”” method=“post”>
<p><label>Date:</label><input type=“text” id=“date” name=“date” /></p>
</form>
</body>
</html>
————————————-
You need to call the jQuery library first then call the masked input library.
This is a requirement because you can not run masked input, without jQuery.
What I had noticed is that you do not have the jQuery library included on the page. If you do not have the library you can get it from the jQuery Website
Let me know if you have anymore questions.