Hi All , I am trying to use Ajax but getting stuck at one point in my code. Please consider the following code, and assume that XMLHttpRequestObject has been created and that this method will be called. The problem is that when this function is called , its not displaying the output. After doing some troubleshooting i figured out that the code will display that data (which here is a text from a text file) if i remove the code which checks for ( XMLHttpRequestObject.status == 200 ) and moreover if i just try to output this status in my html , it gives some unknown error in the internet explorer. Wanted to confirm if this property (status ) is supported by IE 6.0? and if it is what am i doing wrong.
Joined: Nov 08, 2001
Well not all status codes will be 200. So put a check after it and look to see what the statusCode and statusText are.
In reality I would not recommend you coding something like this since there is a lot of quirks. You might want to look at JQuery, Prototye.js, or YUI connection manager.
Joined: Jun 22, 2007
thanks for the suggestion, actually i am just beginning to learn AJAX , i ll try to find more on JQuery and other suggested options. -thanks prakash