I have some javascript function which I call like this:
DoXHRequest("somepage.asp", "POST", params, TheCallbackFunction);
DoXHRequest is defined something like this:
(xmlHttp is XmlHttpRequest properly defined elsewhere)
Expand|Select|Wrap|Line Numbers
- function DoXHRequest(url, params, CallbackMethod)
- {
- xmlHttp.onreadystatechange = CallbackMethod;
- xmlHttp.open("GET", url + "?" + params , true);
- xmlHttp.send(null);
- }
anything else)
in callback there is usual...
[PHP]function TheCallback
{
if (xmlHttp.readyState == 4) { do something }
}[/PHP]
However, this works ok in IE(6,7) ONLY FIRST TIME CLICKED (DoXHR function
invoked), on second click xmlHttp never gets (again) to readyState 4 (or
never invokes callback method again?).
In Firefox everything works perfectly.
Please Help .....
Regards,