Created
April 1, 2014 00:48
-
-
Save lightstrike/9905617 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
<script type="text/javascript"> | |
// function used to make AJAX calls | |
function ajaxFormCall(event, formObject, successFunction, errorFunction) { | |
var data = new FormData(formObject.get(0)); | |
event.preventDefault(); | |
$.ajax({ | |
data: data, | |
type: formObject.attr('method'), | |
url: formObject.attr('action'), | |
cache: false, | |
processData: false, | |
contentType: false, | |
success: successFunction, | |
error: errorFunction | |
}); | |
return false; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment