I am trying to validate a form using jquery validate with PHP. I have done all this using google......I am new to the web development.The form is working absolutely fine in FF but the script is not wotking in IE 11..HELP ME...THANKS... The code is given below:
<script src="js/jquery-1.9.0.js"></script>
<script src="js/jquery.validate.min.js"></script>
<!-- jQuery Form Validation code -->
<script>
// When the browser is ready...
$function() {
// Setup form validation on the #register-form element
$("#register-form").validate({
// Specify the validation rules
rules: {
topic: "required",
detail: "required",
name: "required",
email: {
required: true,
email: true
},
},
// Specify the validation error messages
messages: {
topic: "Enter the subject for your suggestion",
detial: "Please enter your suggestion",
name: "Please enter your name. It will be kept hidden",
email: "Please enter a valid email address",
/* username: "Please enter a valid username",
password: {
required: "Please provide a password",
minlength: "Your password must be at least 5 characters long"
}*/
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>
<table align="center" width="800px" border="1" class="table_css">
<?php echo $output; ?>
<!-- The form that will be parsed by jQuery before submit -->
<tr><td >Submit Your Suggestion</td></tr>
<tr><td>
<form action="add_topic.php" method="post" id="register-form" name="register-form" novalidate>
<div class="label">Subject</div><input type="text" id="topic" name="topic" value="<?php echo $topic; ?>" size="50"/><br />
<div class="label">Suggestion</div>
<textarea name="detail" cols="60" id="detail" rows="15" value="<?php echo $detail; ?>"></textarea><br />
<div class="label">Name</div><input type="text" id="name" name="name" value="<?php echo $name; ?>" size="30" /><br/>
<div class="label">Email</div><input type="text" id="email" name="email" value="<?php echo $email; ?>" size="30"/><br /><div style="margin-left:200px;"><input type="submit" name="submit" value="Submit" /><input type="reset" name="Submit2" value="Reset" /></div>
</form>
</td>
</tr>
</table>