I have a form, and when I submit him I execute multiple script. Here is my code:
$(\"#RequestCreateForm\").submit(function (e) {
if ($(\"#RequestCreateForm\"
return; is the same thing as e.preventDefault();
try
$("#RequestCreateForm").trigger('submit');
To avoid submit loops, an additional variable should be used.
var codeExecuted = false;
$('#RequestCreateForm').submit(function(e) {
...
if(!codeExecuted){
e.preventDefault();
...
functionExecuted = true;
$(this).trigger('submit');
}
});