Hi All,
I need to pass a whole lot of parameters to a web page via the XMLHTTP POST option, but the parameters arn’t being sent.
[CODE]
sUrl = ‘AddToSelection.aspx’;
sQueryString = ‘companyID=’ + CompanyID + ‘&documentTreeID=’ + documentTreeID;
try {
if (XMLReaderObj != null) {
if (XMLReaderObj.readyState != 0) { XMLReaderObj .abort(); } // Abort the previous attempt
XMLReaderObj = null; // remove the HTTP connection
}
XMLReaderObj = getXMLHTTP(); // Open a new HTTP connection
XMLReaderObj.open(‘POST’, sUrl, false);
XMLReaderObj .setRequestHeader(‘Content-Type’,’application/x-www-form-urlencoded’);
XMLReaderObj.send(sQueryString);
} catch(e) { alert(e) } // Catch any major errors
[CODE]
// Get a new HTTP connection
function getXMLHTTP() {
var AX = null;
try {
AX = new ActiveXObject(‘Msxml2.XMLHTTP’);
} catch(e) {
try {
AX = new ActiveXObject(‘Microsoft.XMLHTTP’);
} catch(oc) {
AX = null;
}
}
if(!AX && typeof XMLHttpRequest != ‘undefined’) {
AX = new XMLHttpRequest();
}
return AX;
}
Can anyone tell me what I’m doing wrong ?