I’m making a jsonp request with jquery.ajax() like this:
var cep = 99999999;
$.ajax({
url: "http://cep.paicon.com.br/jsonp/"+ cep +"?callback=addressFunction",
dataType: 'jsonp',
crossDomain: true,
jsonp: false
})
When there alright, the requested page call my callback function normally.
But, in some situations, the requested page don’t return anything.
How can i handle this error, since it won’t call any callback function?
Thanks!
(Sorry for my poor English)
You can set a timeout on your $.ajax() call, and handle the lack of response via that mechanism.