Hi all!
I am trying to access a page through Synchronous Ajax request in
mozilla firefox
I could not get the response ..
After the requset is sent , "onreadystatechange" function is not being
called .. (it does mean that State is not changing ..)
<script>
var req = new XMLHttpRequest();
req.open('GET', '_temp_delete.html', false);
req.send(null);
req.onreadystatechange = function(){
if(req.readyState==4)
{
if(req.status == 200)
alert(req.responseText);
}
};
</script>
But i can view the response in mozilla "firebug console"
What is the problem here ? Any code changes to be made ??
Please help me out ..
Hi all!
I am trying to access a page through Synchronous Ajax request in
mozilla firefox
I could not get the response ..
After the requset is sent , "onreadystatechange" function is not being
called .. (it does mean that State is not changing ..)
<script>
var req = new XMLHttpRequest();
req.open('GET', '_temp_delete.html', false);
req.send(null);
req.onreadystatechange = function(){
if(req.readyState==4)
{
if(req.status == 200)
alert(req.responseText);
}
};
</script>
But i can view the response in mozilla "firebug console"
What is the problem here ? Any code changes to be made ??
Please help me out ..
-----------------------------------------------Reply-----------------------------------------------
There is no onreadystatechange with a synchronous request
Eric
On 11/21/06, Prasad <prasad@gmail.com> wrote:
> Hi all!
> I am trying to access a page through Synchronous Ajax request in
> mozilla firefox
> I could not get the response ..
> After the requset is sent , "onreadystatechange" function is not being
> called .. (it does mean that State is not changing ..)
> <script>
> var req = new XMLHttpRequest();
> req.open('GET', '_temp_delete.html', false);
> req.send(null);
> req.onreadystatechange = function(){
> if(req.readyState==4)
> {
> if(req.status == 200)
> alert(req.responseText);
> }
> };
> </script>
> But i can view the response in mozilla "firebug console"
> What is the problem here ? Any code changes to be made ??
> Please help me out ..