Reputation: 9184
I have such code to get some data via ajax, but sometime's it can raise error...
$.ajax({
url: "/carts/get_cart_totalqnt/qnt/cart/",
type: "GET",
data: {id: $(".cartid").attr("id")},
success: function(text)
{
$("#total_count").html(text + " товар(ов)");
},
error: function(){
alert('Ошибка javascript');
},
dataType : "html"
});
But how can i do, that if i get error i do one more time this request?
Just if error, do this ajax request one more time
Upvotes: 0
Views: 104