Last active
November 13, 2017 14:29
-
-
Save dongalor/b553ff26e8d6a30368ff561be2ff7b68 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$.ajax( { | |
type: 'POST', | |
url: 'http://localhost:1337/sendMail', | |
data: json, | |
dataType: 'json', | |
success: function () { | |
form.style.display = 'none'; | |
}, | |
error: function(jqXHR, textStatus, err) { //show error message | |
console.log('Error: '+textStatus+', err '+err); | |
}, | |
fail: function( jqXHR, textStatus ) { | |
console.log( "Request failed: " + textStatus ); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment