Hi everyone,

I am new to AJAX. I have created a document that works fine in Safari but does not work in Firefox. the problem is that I have two combo boxes, when I change the value in the first combo box I want the values of the second combo box to be changed accordingly. I am doing this using AJAX, it works fine in Safari but does not work in Firefox.

Here is the code

var xmlHttp;

function createRequestObject()
{
var element;
try
{
// Opera 8.0+, Firefox, Safari
element = new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer Browsers
try
{
element = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
element = new ActiveXObject("Microsoft.XMLHTTP");

} catch (e)
{
// Something went wrong
alert("Your browser broke!");
return false;
}
}
}
return element;
}

xmlHttp = createRequestObject();
xmlHttp.open("GET", 'serverreq.php?strComboValues=' + document.getElementById('cmboType').value, true);

xmlHttp.overrideMimeType('text/xml');
xmlHttp.onreadystatechange = function()
{
if (xmlHttp.readyState == 4)
{
var responce = xmlHttp.responseText;
//the remaining code
}
updateComboBoxValues();
}


Thanks in Advance.