开发者

Why is my AJAX request hanging after running for a while?

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 g开发者_高级运维ets executed (same if onSuccess is replaced with onComplete).

So why is my code doing this? Thanks.


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


as pb said, shouldn't it be

onInteractive: function(){
document.getElementById('meh').innerHTML='Interactive'
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜