I'm using jQuery in our Java project and 3 AJAX requests to refresh 3 columns. The problem is if you click something before the response received that sometimes one of the JSPs meant to return response in a particular DIV, overwrites the entire page and has beeing returned as a new page. I use AJAX Queue plugin which should cancel the requests in the queue, but I think it isn't working..
I make this AJAX request 3 times in a queue:
$('#col<%=col%>')
.html("<div style='float: left; width: 100%'><img src='css/ajax-loader2.gif' /></div>");
var url='CoreFetchCategoryHandler.jsp';
ajaxManager.add({
success: function(html) {
$('#col<%=col%>').html(html);
},
type: "POST",
url: url,
data: "<%=baseString%><%=keywordsString%>category=<%=columnnCategory%>&showItems=30",
cache: true,
error: function(a, b) {},
abort: function() {
$.manageAjax.clear("cacheQueue", true)
}
});
Can anybody help me with this? Thanks!