views:

38

answers:

2

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.

A: 

Shouldn't the onInteractive event handler be a reference to a function?

pb
It should be, but it was put in there as a debug and works for the purposes of testing the AJAX status. Once the issue is resolved, that line will be removed.
JustJon
A: 

as pb said, shouldn't it be

onInteractive: function(){
document.getElementById('meh').innerHTML='Interactive'
}
Rigobert Song
The issue is unrelated to that line. It was added after attempting to diagnose the issue and works for debugging purposes.
JustJon