Skip to content

Instantly share code, notes, and snippets.

@alvintamie
Created April 2, 2015 15:30
Show Gist options
  • Save alvintamie/301a0a117b40f4f24839 to your computer and use it in GitHub Desktop.
Save alvintamie/301a0a117b40f4f24839 to your computer and use it in GitHub Desktop.
$(this.refs.form.getDOMNode()).ajaxForm( {
xhrFields: {
withCredentials: true
},
error: function(response, status) {
console.log(response.responseText);
console.log(status)
},
success: function(response, status) {
console.log(response);
console.log(status)
}
}).submit();
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script>
<script src="http://malsup.github.com/jquery.form.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment