Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //taken from an SO answer
- $.post(url, data).error(function(x,e){
- /if(x.status==0){
- console.log('You are offline!!\n Please Check Your Network.');
- }else if(x.status==404){
- console.log('Requested URL not found.');
- }else if(x.status==500){
- console.log('Internel Server Error.');
- }else if(e=='parsererror'){
- console.log('Error.\nParsing JSON Request failed.');
- }else if(e=='timeout'){
- console.log('Request Time out.');
- }else {
- console.log('Unknow Error.\n'+x.responseText);
- }
- })
- .done(function(data){
- setFlash('Order Updated');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement