Hi,
I had a strange problem with firefox ver 3.0.5 that doesn't occur in IE6, opera 9.63 nor in Safari 3.2.1 the problem is that when I call the function GetXmlHttpObjec t (The function is displays below) nothing is happening. The function should insert a listbox in a div. It works for me in the past in firefox 2.0 but now it was stop working.
The error that I got is:
document.getEle mentById(countr yLisboxID) is null
Line 105
I try to debug it and I found that it doesn't enter the function " xmlHttp.onready statechange = function() " at all. What can be the reason.
on the other hand when I look at the fiebug I see that I got the desire list box from the server with all the values. Can anyone advise about it.
I had a strange problem with firefox ver 3.0.5 that doesn't occur in IE6, opera 9.63 nor in Safari 3.2.1 the problem is that when I call the function GetXmlHttpObjec t (The function is displays below) nothing is happening. The function should insert a listbox in a div. It works for me in the past in firefox 2.0 but now it was stop working.
The error that I got is:
document.getEle mentById(countr yLisboxID) is null
Line 105
I try to debug it and I found that it doesn't enter the function " xmlHttp.onready statechange = function() " at all. What can be the reason.
on the other hand when I look at the fiebug I see that I got the desire list box from the server with all the values. Can anyone advise about it.
Code:
function GetXmlHttpObject(divID,url)
{
xmlHttp=XmlHttpObject();
if (xmlHttp==null)
{
alert("Your browser does not support AJAX!");
return FALSE;
}
xmlHttp.onreadystatechange = function()
{
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
{
document.getElementById(divID).innerHTML=xmlHttp.responseText;
}
}
xmlHttp.open("GET", url,false);
xmlHttp.send(null);
}
Comment