...

View Full Version : Ajax Xmlhttp Stops Randomly



Nukuv
12-03-2010, 08:56 PM
I have a function that loads some text and puts it into a div. Here it is:


function MessageGet()
{
MessageXMLDoc("ajaxget?messages",function()
{
if (xmlhttp3.readyState==4 && xmlhttp.status==200)
{
document.getElementById("message").innerHTML=xmlhttp3.responseText;
}
if (xmlhttp3.readyState==4 && xmlhttp.status!=200)
{
document.getElementById("message").innerHTML="";
}
if (xmlhttp3.readyState==4)
{
setTimeout('MessageGet()',1000);
}
});
}


At first it works fine, but at seemingly random points, it just... stops. What am I doing wrong? Any help at all would be appreciated.

Code is live at http://sc.scworlds.net/ but requires login(Use g.pirate and noway)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum