I have a form, and when I submit him I execute multiple script. Here is my code:
$(\"#RequestCreateForm\").submit(function (e) {
if ($(\"#RequestCreateForm\"
$("#RequestCreateForm").submit(function (e) {
if ($("#RequestCreateForm").validate().checkForm() === false) {
e.preventDefault();
//form was NOT ok - optionally add some error script in here
return false; //for old browsers
} else{
//form was OK - you can add some pre-send script in here
}
//$(this).submit();
//you don't have to submit manually if you didn't prevent the default event before
}