I have the following code that is part of the ajax call
I instantiate the object with this code
Works great in Opera, Firefox and Mozilla...Constantly blows up on IE on the line where i try to assign the results back to the div.
Any ideas as to what I am doing wrong?
TIA
Bastien
I wish my computer would do what I want it to do,
instead of what I tell it to do...
Code:
var data = "name="+name+"&email=" + email + "&details="+details;
// var objAJAX1 = getAjaxObject();
var objAJAX1 = getHTTPObject();
if (objAJAX1 != null){
objAJAX1.onreadystatechange = function(){
if (objAJAX1.readystate == 4) {
if (objAJAX1.status == 200) {
strResponse = objAJAX1.responsetext;
document.getElementById("emailform").innerHTML = strResponse; //failure here
objAJAX1 = null;
}
}
}
sendRequest(objAJAX1, "POST", "contact.php", true, data);
}
I instantiate the object with this code
Code:
function getHTTPObject() {
var xmlhttp;
var browser = navigator.appName;
if (window.ActiveXObject)
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
else
xmlhttp = false;
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = false;
}
}
return xmlhttp;
}
Works great in Opera, Firefox and Mozilla...Constantly blows up on IE on the line where i try to assign the results back to the div.
Any ideas as to what I am doing wrong?
TIA
Bastien
I wish my computer would do what I want it to do,
instead of what I tell it to do...