Hai friends


I have listed the combo box va;ues useing ajax function foe example when user select the region related country displaying the next combo box , Its working for fier fox breowser but iits not working in IE I am getting the java script error. (Object required)

Please help me how to solve the issue .

vssp

Do you use any AJAX frameworks?
If no, Can you provide a code?

Yes I am using AJAX concept

Please any one help me how to solve the issue

Thanks
vssp

can you post the offending code?

Here is the code

function checkSearchCriteria()
{


if(window.XMLHttpRequest)
{
http=new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
http=new ActiveXObject("Microsoft.XMLHTTP");
}
var id = (parseInt(document.getElementById("Region").value))+1;
//ert(id);
//var url = "countrylist.php?rid="+((document.getElementById("Region").value);
var url = "countrylist.php?rid="+id;
//ert(url);
//mlsaddress=address;
http.open("GET", url , true);


http.onreadystatechange = countryprocess;


http.send(null);
}


function countryprocess()
{


if (http.readyState == 4) {
//alert (http.readyState);
// Split the comma delimited response into an array
if(http.status==200)
{


//alert (http.status);
//alert (http.responseText);
document.getElementById("Country").length=0;
document.getElementById("Country").options[0]=new Option("Select country"," ");


if(http.responseText!="No values")
{


var clist=http.responseText.split("_");
for(i=0;i<clist.length;i++)
{
var myclist=clist.split(",");
//  alert (myclist);
document.getElementById("Country").options[i+1]=new Option(myclist[1],myclist[0]);
}
}
else
{
document.getElementById("Country").length=0;
document.getElementById("Country").options[0]=new Option("Select country"," ");
}
}


}
}
//-->

Your code seems fine, what is the ContentType of the returned document? it must be text/xml otherwise ie will not cooperate.

ok Thanks

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.