Guest User

Untitled

a guest
Jun 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. $.ajax({
  2. url: '/path/to/file',
  3. type: 'POST',
  4. dataType: 'json',
  5. data: {param1: 'value1'},
  6. complete: function(xhr, textStatus) {
  7. doSomethingOnComplete();
  8. },
  9. success: function(data, textStatus, xhr) {
  10. doSomethingOnSuccess();
  11. },
  12. error: function(xhr, textStatus, errorThrown) {
  13. doSomethingOnError();
  14. }
  15. });
Add Comment
Please, Sign In to add comment