Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. $().ready(function(){
  2. $.ajaxSetup({
  3. error:function(x,e){
  4. if(x.status==0){
  5. alert('You are offline!!\n Please Check Your Network.');
  6. }else if(x.status==404){
  7. alert('Requested URL not found.');
  8. }else if(x.status==500){
  9. alert('Internel Server Error.');
  10. }else if(e=='parsererror'){
  11. alert('Error.\nParsing JSON Request failed.');
  12. }else if(e=='timeout'){
  13. alert('Request Time out.');
  14. }else {
  15. alert('Unknow Error.\n'+x.responseText);
  16. }
  17. }
  18. });
  19. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement