Srinivasulu Enugu

Srinivasulu Enugu

  • 1.7k
  • 58
  • 5.8k

JavaScript runtime error: sEmail' is undefined

Aug 6 2015 5:16 AM
I am getting runtime error , please find the code and help me
<script type="text/javascript" src="Scripts/jquery-1.7.1.min.js">
</script>
<script type="text/javascript">
$(document).ready(function () {
$("#txtregUsername").blur(function (e) {
var Username = $("#txtregUsername").val();
if (Username == "" || Username == 0) {
alert("Please valid E-Mail Adress");
debugger;
}
else {
validateEmail(emailID);
}
});
});
function validateEmail(sEmail) {
var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
if (filter.test(sEmail)) {
return true;
}
else {
return false;
}
}
</script>

Answers (4)