File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with XMLHttpRequestObject.

 
prakash chauhan
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.



 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Eric
 
prakash chauhan
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic