Hi,
I'm trying to catch Ajax timeout error with jQuery 1.4.2, but none of tutorial I found work. In Firebug, when timeout error fires. I see uncaught exception: [object Object]
. Please help me handle Ajax timeout. Here's my JS code:
$.ajax({
type:"POST",
url:"/data/add/",
data:
{
"date":$("input#date").val();
},
dataType:"json",
timeout:2000,
success: function(response) {
},
error: function () {
alert('Server error');
}
});