Hi all,

The following Ajax script is working in all the browser expect Internet explorer.

Code:
var xmlHttp;

function GetXmlHttpObject(){
	var xmlHttp;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		xmlHttp = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	
	return xmlHttp;
}




///Supplier Master
function Getsuppliercode(){

	var SupplierGroup = document.getElementById('supplier_group').value;
	
	if(SupplierGroup == ''){
		document.getElementById('suppliercode').value = '';
		document.getElementById('suppliercode').innerHTML ='<option value="">--- SELECT ---</option>';
	}
	else{
		
		xmlHttp=GetXmlHttpObject()
		var queryString = "?supplier_group="+SupplierGroup;
		//alert (queryString);
		xmlHttp.onreadystatechange=function()
		{ 
				if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
				var dep = ''; 
				var result = xmlHttp.responseText;
				//document.getElementById('suppliercode').value = '';
				document.getElementById('suppliercode').innerHTML ='<option value="">--- SELECT ---</option>';
				//document.getElementById('empname').value = '';
				var re = result.split(',');
				for(i=0;1<re.length;i++){
					if(re[i] == ''){
						break;
				}
				//alert("<option value="+re[i]+">"+re[i]+"</option>")
				document.getElementById('suppliercode').innerHTML += "<option value="+re[i]+">"+re[i]+"</option>";	
				}									
			} 
		}
		//alert ("getsuppliercode.php" +queryString);
		xmlHttp.open("GET","getsuppliercode.php" + queryString,true);
		xmlHttp.send(null);
		
		return true;
	}		
}
Could somebody tell me why it is not working in IE.

Thank you.