Guest User

Untitled

a guest
Nov 21st, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. Here's an example of how you get JSON data on error:
  2.  
  3. $.ajax({
  4. url: '/path/to/script.php',
  5. data: {'my':'data'},
  6. type: 'POST'
  7. }).fail(function($xhr) {
  8. var data = $xhr.responseJSON;
  9. console.log(data);
  10. });
Add Comment
Please, Sign In to add comment