I have this bit which I have actually only tried in Google Chrome, but it works finte there:

Im using ajax to get data from the Db, when popuating one select list based on whats selected from another:

But in Internet Explorer 9, it doesnt work:

// JavaScript Document
function MakeRequestObject(){
var xmlhttp=false;
try {
xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');	
} catch (e) {
try {
xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
} catch (E) {
xmlhttp = false;
	}
}
if(!xmlhttp && typeof XMLHttpRequest!='undefined'){
xmlhttp = new XMLHttpRequest();	
}
return xmlhttp;
}
		
function showUser(cat){
var xmlhttp=MakeRequestObject();
xmlhttp.open('GET', 'ajax/selectbox.php?page_position='+cat, true);
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4 && xmlhttp.status==200){
var content = xmlhttp.responseText;
			
if ( content ) {
document.getElementById('pos').innerHTML = content
			}
	}
}
xmlhttp.send()
}

IS this not suitable for IE9, or what can I do to fix this? It is urgent that it works in IE9, so I hope someone knows how to fix it?!?

Can it be my browser settings?

Have you considered using a JavaScript library, like jQuery or Mootools for performing AJAX and other JavaScript tasks? These libraries perform all of the heavy listing and are thoroughly tested to ensure maximum cross-browser compatibility.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.