I have a form, and when I submit him I execute multiple script. Here is my code:
$("#RequestCreateForm").submit(function (e) {
if ($("#RequestCreateForm").validate().checkForm() == false) { return; }
e.preventDefault();
//many scripts
//How to continue submitting?
}
Is it possible to continue submitting the form (which is stopped with e.preventDefault();
) after //many scripts
?
Thank you
To avoid submit loops, an additional variable should be used.
Here is my approach to avoid the infinite loop.
<input type="button" id="submit" value="submit"/>
) to mimic the submit button;return; is the same thing as e.preventDefault();
try
All solutions here are too complicated or lead to javascript error, simpliest and clearest solution I guess: