$.ajax({ url: "weather.php", action: "get_weather", dataType: 'json', success: function(json){ .... do something .... }, error: function ( request, errtype, e ) { alert ( 'An error occurred while loading this report. ');
}, });Im using $.ajaxSetup( { timeout: 2000 } ); beacause the php sometimes dosnt response.