Last active
December 31, 2021 10:01
-
-
Save erowsika/eb5885a9551c2c0eb8fd1b3876974ea1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$request = null; | |
$('form').on('submit', function(event) { | |
event.preventDefault(); | |
if ($request != null) { | |
$request.abort(); | |
$request = null; | |
} | |
$request = $.ajax({ | |
// ... | |
error: function(err) { | |
if (err.statusText =='abort') { | |
return; | |
} | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment