|
Hi all,
alert(xmlhttp.responseText);
throughs an error System error 1072896658
I have declared the object as
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
it works for IE version 6.0.2600 but not for IE version 6.0.2800.
Pls help me
i coudnlt find out what this error means.
|
|
|
XMLHttp is not really part of the browser. It is something that is accessible to the browser. You may have different versions of XMLHttp installed which may require a slightly different way of instantiation (I believe XMLHttp is installed as part of MSXML, latest version is 4). Also the way to call it on safari and ie on macos is different also. Here's some sample js that tries to do the right thing in supporting macos/windows and the different flavors of xmlhttp.
var req;
function loadXMLDoc(url) {
req = false;
// branch for native XMLHttpRequest object
if(window.XMLHttpRequest) {
try {
req = new XMLHttpRequest();
} catch(e) {
req = false;
}
// branch for IE/Windows ActiveX version
} else if(window.ActiveXObject) {
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
req = false;
}
}
}
if(req) {
req.onreadystatechange = processReqChange;
req.open("GET", url, true);
req.send();
}
}
There's also a decent write up of this at the following link (where I pulled the code above also): http://developer.apple.com/internet/webcontent/xmlhttpreq.html
semper fi...
|
|
|
|
|
|
|
|