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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.