I had a big problem with onreadystatechange because the function wouldn't be called.
The code looked like this:
http_request.open("GET","time.php",true);
http_request.send(null);
http_request.>{
.....
}
The problem was it worked only once. After trying so many things I understood the URL to http_request.open() should change everytime we call this function, otherwise it assumes the status for this call is already 4 and onreadystatechange is not called.
Then I created a dummy counter and each time changed it. It works both in IE and FireFox the same way.
http_request.open("GET","time.php?coun=" + counter,true);
counter++ ;
I initialize this counter in window.onload.
This does not make sense but seems it works. Any comments or solution?
[Noelle Mallory - MSFT] Please post questions to the MSDN Forums at http://forums.microsoft.com/msdn. You will likely get a quicker response through the forum than through the Community Content.