javascript - Ajax call back function to redirect another page -


i need capture 901 error codes in header.jsp handle ajax errors globally.

in browser console getting:

get https://localhost:8443/ssapp/pan/report?&vessel…namax%20tanker%20pool%20limited&rpttitle=activity%20report&_=1431351700771 901 (ok)

how can capture , redirect on basis of whether got 901 error code or not?

you can use ajax status code:

$.ajax({   statuscode: {     400: function() {       alert('400 status code! user error');     },     901: function() {       alert('error 901');     }   } }); 

Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -