Why is my AJAX request hanging after running for a while?
Posted
by JustJon
on Stack Overflow
See other posts from Stack Overflow
or by JustJon
Published on 2010-03-24T13:50:25Z
Indexed on
2010/03/24
13:53 UTC
Read the original article
Hit count: 410
AJAX
|ajax.request
My AJAX calls from a page I wrote is hanging after an indeterminate number of calls. The page makes a request after a preset amount of time (currently 5 seconds) gets data from my server then waits the amount of time again. When I put the following as my AJAX Request:
myAjax = new Ajax.Request(
url,
{
method: 'get',
asynchronous: true,
url: url,
parameters: querystring,
onInteractive: document.getElementById('meh').innerHTML='Interactive',
onSuccess: processXML
});
The div with the id "meh" will get the word Interactive written to it, but the Success condition never gets executed (same if onSuccess is replaced with onComplete).
So why is my code doing this? Thanks.
© Stack Overflow or respective owner