Cannot read property 'mobile' of undefined at file:///android_asset/www/jquerymobile120.js:256
I have included the latest jqueymobile.js
When I click on submit button, I got the error as below:
Cannot read property 'mobile' of undefined at file:///android_asset/www/jquerymobile120.js:256
Below is code of my HTML File (index.html):
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<link href="registrationstyle.css" type="text/css" rel="stylesheet">
<script src="jquery.min.js"></script>
<script src="jquerymobile120.js"></script>
<meta charset="UTF-8" />
<title></title>
<style type="text/css" media="screen">
#wrap
{
width:100%;
height:100%;
background: #E6E6E6;
}
#heading_font
{
width:96%;
margin-left:2px;
margin-right:2px;
padding:4px 0px 4px 15px;
background-color:#333333;
color:#FFFFFF;
overflow:hidden;
border-radius:5px;"
}
</style>
</head>
<body bgcolor="#E6E6E6">
<div id="wrap">
<div>
<span style="float:left" ></span>
<span style="float:right" ></span>
</div>
<br>
<div id="heading_font">Registration</div>
<br>
<form class="form-container">
<div class="form-title">
</div>
<div class="form-title">Cell Number</div>
<input maxlength="10" name="mobilenumber" id="mobilenumber" class="form-field" type="number"><br>
<br>
<div class="form-title">Email-ID</div>
<input maxlength="50" name="email" id="email" class="form-field" type="text"><br>
<br>
<div class="submit-container">
<input id="submitp" onclick="validateForm()" type="submit">
</div>
</form>
</div>
<script>
function CallNextPage()
{
document.location="SignIn.html";
}
function validateForm()
{
var mobile_number=document.getElementById('mobilenumber').value;
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.getElementById('email').value))
{
alert("done one");
document.location="SignIn.html";
alert("done two");
}
else
{
alert("You have entered an invalid email address!");
}
if(mobile_number.length<10)
{
alert("Mobile Number length cannot be less than 10");
}
}
</script>
</body>
</html>