Below is the code we are using to set up the XMLHttPRequest object.
Looking at the results of the alert messages (shown below) I verified that
this.bAsync = false and this.bInDebug = true.
Bill
function XmlRequestProcessor(path, qString, method, async, inDebug) {
alert("path = " + path + ",qString= " + qString + ",method= " + method + ",async= " + async + ",inDebug= " + inDebug);
//Properties
var self = this;
this.oParent = null;
this.oXmlHttpReq = null;
this.sPath = path;
this.sQuery = (!qString)?"":qString;
this.sMethod = (!method || method == "")?"POST":method.toUpperCase();
this.bAsync = async = (typeof async == 'undefined' || async == null)?true:async;
this.bInDebug = inDebug = (typeof inDebug == 'undefined' || inDebug == null)?false:inDebug;
alert("sPath = " + this.sPath + ",sQuery= " + this.sQuery + ",sMethod= " + this.sMethod +
",bAsync= " + this.bAsync + ",bInDebug= " + this.bInDebug);
//methods
this.process = null;
if (window.XMLHttpRequest) {
this.getXmlHttpReqObj = ns_xmlReq_getXmlHttpReqObj;
} else if (window.ActiveXObject) {
this.getXmlHttpReqObj = ie_xmlReq_getXmlHttpReqObj;
}
this.transmitData = ldc_xmlReq_transmitData;
this.appendText = ldc_xmlReq_appendText;
this.appendHtml = ldc_xmlReq_appendHtml;
this.useInnerHtml = ldc_xmlReq_useInnerHtml;
this.applyProcess = ldc_xmlReq_applyProcess;
this.processText = ldc_xmlReq_processText;
this.processHtml = ldc_xmlReq_processHtml;
this.processInnerHtml = ldc_xmlReq_processInnerHtml;
this.createHtmlNode = ldc_xmlReq_createHtmlNode;
this.exeProcess = ldc_xmlReq_executeProcess;
this.copyAttributes = ldc_xmlReq_copyAttributes;
//calls
//Seperated out to support the diff between IE and Mozilla
self.oXmlHttpReq = this.getXmlHttpReqObj();
self.oXmlHttpReq.onreadystatechange = function( ) {
self.exeProcess(self.oXmlHttpReq);
}
self.oXmlHttpReq.open(this.sMethod, this.sPath, this.bAsync);
if (self.sMethod == "POST") {
self.oXmlHttpReq.setRequestHeader("Connection", "close");
self.oXmlHttpReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
self.oXmlHttpReq.setRequestHeader("Method", "POST " + self.sPath + "HTTP/1.1");
}
}