Jump to content

innerhtml problem select form


zimmo

Recommended Posts

I have been working with Minase off here to get a script functioning, and we have it working fine in firefox and safari etc.. but there seems to be issues with internet explorer and the script is not functioning in that browser. It seems it is an inner html issue. I am very new to ajax and my javascript is limited, but Minase has been assisting me, but is not around, and I have a deadline of today. I just need to get this working in internet explorer, can anyone please help. here is the ajax code for the script.

 

function get_XmlHttp() {
var xmlHttp = null;
// if a native XMLHttpRequest object exists
if ( window.XMLHttpRequest ) {
xmlHttp= new XMLHttpRequest;
} else {
// let's try an ActiveXObject 
try {
xmlHttp= new ActiveXObject("MSXML2.XMLHTTP.6.0");
} catch(ex) {
xmlHttp= new ActiveXObject("Microsoft.XMLHTTP");
}
}

return xmlHttp;
}

function ajaxrequest(tagID,post) {
var http =	get_XmlHttp();
var	info = 'request='+post;

http.onreadystatechange = function() {
if (http.readyState == 4) {
	document.getElementById(tagID).innerHTML = http.responseText;
}
}
http.open("POST", 'destinations.ajax.regions.php', true); // edit php.php to your actual php file path
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.send(info);

}

Link to comment
https://forums.phpfreaks.com/topic/189843-innerhtml-problem-select-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.