Welcome to WebmasterWorld Guest from 23.22.46.195

Forum Moderators: httpwebwitch

XML and JavaScript -- waitForResponse

   
4:41 pm on Oct 25, 2006 (gmt 0)

5+ Year Member



I was wondering if someone knows how to set a TimeOut or waitForResponse for XMLHTTP using JavaScript in the code below. oXML.waitForResponse(3600) errors out. Any other ideas?

-----------------------------------------
// USED TO MAKE A ASYNCHRONOUS XML HTTP REQUEST AND CALL A FUNCTION
//SENDING AS A PARAMTER, THE RESPONSE TEXT FROM THE REQUEST
//CURRENTLY CAN ONLY HANDLE CALLING FUNCTIONS THAT REQUIRE ONE PARAMETER
var oXml = new ActiveXObject("Microsoft.XMLHTTP");
var result;

oXml.onreadystatechange = function ProcessResponse()
{
if(oXml.readyState == 1)
{
//oXml.waitForResponse(3600) // Wait 60 minutes to receice a response back.
bar1.showBar();
}

if(oXml.readyState == 4)
{
try
{
result = oXml.responseText;
if(methodtocall!=null)
methodtocall(result);
bar1.hideBar();
}

catch(e) {
HandleError( e);
}
}

}

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month