CodeIgniter Forums
xAjax response - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: xAjax response (/showthread.php?tid=17776)



xAjax response - El Forum - 04-15-2009

[eluser]Harishkulkarni[/eluser]
How to find status of response while using xajax.
I want to check in cases like when loading response, when loading completed.


xAjax response - El Forum - 04-15-2009

[eluser]Berserk[/eluser]
install Firebug addon for Firefox Big Grin


xAjax response - El Forum - 04-15-2009

[eluser]TheFuzzy0ne[/eluser]
[url="http://www.getfirebug.com/"]I second AND third that![/url]


xAjax response - El Forum - 04-15-2009

[eluser]Harishkulkarni[/eluser]
In firebug we can just see the loading status.
But in code i want to check.
Like in normal ajax we check as if(respobj.status==200)... like this i want to check.
any idea on this?


xAjax response - El Forum - 04-16-2009

[eluser]TheFuzzy0ne[/eluser]
Firebug does all of that, and much, much more! You can see the data sent, data received, headers sent and received, the status. The list is endless.


xAjax response - El Forum - 04-16-2009

[eluser]Harishkulkarni[/eluser]
thanks for replying.
yes.. firebug will display all those things.

I am not telling about that status.
I am telling about XMLHttp object onreadystatechange Properties.

please go through this link http://www.w3schools.com/ajax/ajax_xmlhttprequest.asp.

here responseobject's ready state properties are tabulated(like '0' for request has not initialized , '1' for request has been set up) .

I want to know how we can test these status of response object in CI?

How can i test this below code using CI ?

xmlHttp.onreadystatechange=function()
{
if(xmlHttp.readyState==4)
{
// Get the data from the server's response
}
}


any ideas on this is very help full for me Smile