Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. $('#PostForm').on('submit', function(e) {
  2. var formData = new FormData(this);
  3. e.preventDefault();
  4. $.ajax({
  5. url: 'resources/ajax/content.php',
  6. type: 'POST',
  7. data: formData,
  8. processData:false,
  9. contentType:false
  10. })
  11. .done(function() {
  12. console.log("success");
  13. })
  14. .fail(function() {
  15. console.log("error");
  16. })
  17. .always(function() {
  18. console.log("complete");
  19. });
  20.  
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement