Hello,
I'm trying to create a chat application with jQuery without having to using setTimeout in order to minify the number of ajax request :
function checkChat(){
new jQuery.ajax({
'url' : './chat/check.php',
'cache' : false,
'success' : function(messages) {
if( messages.length ) {
$("#empty_chat").append(messages);
//write to chat wall
}
checkChat();
}
});
}
On a simple page that's working great but on page that have others ajax events (like navigation) the request are queued and nothing appear as long as messages is empty.
The cursor is on a waiting state too.
Is there any way to solve this ?
Thanks, Adrien