[jQuery] getJSON: how to attach failure callback?
Hi!
I am working with getJSON to get JSON data via HTTP GET request.
It works well, but sometime the server itself fail to get the
data (error status returned). In this case the getJSON never get
called and the text "loading..." I put in the page just stay
there forever (well, until the user tried again).
Is there anyway to attach a failure callback to a specific
getJSON call?
I see there is ajaxError, but how this actually work so I can
attach it to a specific getJSON call?
Or do you have other suggestion on other method replacing
getJSON tp get JSON data via HTTP GET request where I can have
both success and failure callback?
Thanks!
--
(stephan paul) Arif Sahari Wibowo
_____ _____ _____ _____
/____ /____/ /____/ /____
_____/ / / / _____/ http://www.arifsaha.com/