Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#PostForm').on('submit', function(e) {
- var formData = new FormData(this);
- e.preventDefault();
- $.ajax({
- url: 'resources/ajax/content.php',
- type: 'POST',
- data: formData,
- processData:false,
- contentType:false
- })
- .done(function() {
- console.log("success");
- })
- .fail(function() {
- console.log("error");
- })
- .always(function() {
- console.log("complete");
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement