By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,313 Members | 2,725 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,313 IT Pros & Developers. It's quick & easy.

"xmlhttprequest is undefined" error in IE6

P: n/a
In IE6 i get an error: "XMLHttpRequest is undefined", whereas in other
browsers (e.g. ie7) it works fine:

var get;

function getdata(region,page) {
get = new XMLHttpRequest();
get.onreadystatechange = processdata;
get.open("GET","myurl");
get.send(null);

}

function processdata() {

if (get.readyState == 4) {
data = get.responseText;
document.getElementById("results_display").innerHT ML = data;
}

}
can anyone see the problem here?

thanks

marc

Feb 9 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Feb 9, 12:38 pm, libsfan01 wrote:
In IE6 i get an error: "XMLHttpRequest is undefined", whereas in other
browsers (e.g. ie7) it works fine:
Versions of IE prior to 7 used an ActiveX component for XML HTTP
requests.

Richard.

Feb 9 '07 #2

P: n/a
libsfan01 wrote:
In IE6 i get an error: "XMLHttpRequest is undefined", whereas in other
browsers (e.g. ie7) it works fine:
var AJAX = null; //
Initialize the AJAX variable.
if (window.XMLHttpRequest) { //
Are we working with mozilla?
AJAX=new XMLHttpRequest(); //
Yes -- this is mozilla.
} else { //
Not Mozilla, must be IE
AJAX=new ActiveXObject("Microsoft.XMLHTTP"); //
Wheee, ActiveX, how do we format c: again?
} //
End setup Ajax.
if (AJAX==null) { //
If we couldn't initialize Ajax...
alert("Your browser doesn't support AJAX."); //
Sorry msg.
return false //

}
--
http://www.hunlock.com -- Musings in Javascript, CSS.
$FA
Feb 9 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.