Script (AJAX or JS) does not work properly in IE8
- by Uno Mein Ame
I have a js/ajax script at http://worldcitiesdatabase.info/test1/
I just received a complaint that it does not work properly in IE8.
Onchange seems to work, but then the next menu is not populated.
Can you please help me figure it out?
Thanks
Not sure what the problematic part of the code is. Here is my guess:
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
} else {// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
newList="";
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
newList = xmlhttp.responseText;
m1.innerHTML=newList;
m1.disabled=false;
}
if (menuname=="showCountry") {
var c1=document.getElementById('showRegion');
if (c1.options.length==2) {
if (c1.options[0].value=='NONE') {
c1.remove(0);
c1.value='0';
reloadmenu(c1);
}
}
}
}
xmlhttp.open("GET",newFile+".php?q="+menuvalue,true);
xmlhttp.send();