So I have an ajax script that gets information from a php page and fills some select forms based on earlier options.
You make a selection in the first drop-down select menu and 6 others get updated with valid options.
I use a script that works in all browsers without problem, except for IE.
I have IETester and the debugger to see what goes wrong. If I view the source code from the generated page in IE it has retrieved the correct information from the script, but it is not displaying it. Weird?
Anyway, if anyone can help me that would be great. Here is the code I’m using. I call the function multipleAjax() onchange at the first <select>.
[code]
function multipleAjax() {
AjaxGet(“MyCmd”, “Thefirstfield”, “Thisfield”)
setTimeout(‘AjaxGet(“MyCmd”, “Thefirstfield”, “Thisfield”)’, 10);
setTimeout(‘AjaxGet(“MyCmd”, “Thefirstfield”, “Thisfield”)’, 20);
setTimeout(‘AjaxGet(“MyCmd”, “Thefirstfield”, “Thisfield”)’, 30);
setTimeout(‘AjaxGet(“MyCmd”, “Thefirstfield”, “Thisfield”)’, 40);
setTimeout(‘AjaxGet(“MyCmd”, “Thefirstfield”, “Thisfield”)’, 50);
}
function AjaxGet(cmd, tid, eid)
{
var xmlHttp=GetXmlHttpObject();
if (xmlHttp==NULL)
{
alert (“Your browser does not support AJAX!”);
return;
}
var id = document.getElementById(tid).value;
var url=”ajax.php?id=”+id;
url=url+”&cmd=”+cmd;
url=url+”&sid=”+Math.random();
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState==4) {
document.getElementById(eid).innerHTML=xmlHttp.responseText;
}
};
xmlHttp.open(“GET”,url,true);
xmlHttp.send(null);
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try // Firefox, Opera 8.0+, Safari
{
xmlHttp=new XMLHttpRequest();
}
catch (e) // Internet Explorer 6.0+
{
try
{
xmlHttp=new ActiveXObject(“Msxml2.XMLHTTP”);
}
// 5.5+
catch (e)
{
xmlHttp=new ActiveXObject(“Microsoft.XMLHTTP”);
}
}
return xmlHttp;
}
Any help is greatly appriciated.