AJAX
  Home arrow AJAX arrow Page 2 - How to Handle Ajax Errors
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
AJAX

How to Handle Ajax Errors
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 7
    2009-01-21


    Table of Contents:
  • How to Handle Ajax Errors
  • Server or Transmission Line is not functioning
  • HTTP Status
  • Thread effect of Ajax Request

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    How to Handle Ajax Errors - Server or Transmission Line is not functioning
    ( Page 2 of 4 )

     

    I can only give you my experience here. If the server or the transmission lines stop functioning after the user sees his web page on the screen, no Ajax text or error message will be downloaded. Nothing would come in place of the Ajax text. Now, what I have said here is my experience. 

    Server script does not function 

    It is possible for you to write a script that does not function at the server. I am talking here about the script that has to send the Ajax text from the server to the client. If the script is not functioning, and everything else is functioning, you will definitely not have the downloaded Ajax text. However, the server may send an error message in place of the Ajax text. The user would then see the error message instead of the Ajax text. The best way to avoid this is to make sure that your script does not have errors.

    The readyState property of the JavaScript Ajax object  

    The "readyState" property keeps track of the current stage of the request by returning an integer. The readyState property of the JavaScript Ajax object can have the value 1, or 2, or 3, or 4. The meanings of these values are as follows: 

    0: uninitialized

    1: loading

    2: loaded

    3: interactive

    4: complete  

    The value to always use is the last one, which indicates that the download has been completed. See the illustration in the Ajax code above. The question is, “can any of these values be used to check errors?” The answer is no. You cannot use any of these values to determine whether an error has occurred. You can use these values just to check which stage the response of the request has reached.



     
     
    >>> More AJAX Articles          >>> More By Chrysanthus Forcha
     

       

    AJAX ARTICLES

    - PHP AJAX Form Validation
    - Completing a User-Defined CSS Website with P...
    - Create a User-Defined CSS Website with PHP
    - Build A Better Twitter Chat Client Than Cham...
    - Using Division Equations to Make Web Forms S...
    - Using Integer Multiplication to Protect Web ...
    - Using Simple Checksums for Web Form Verifica...
    - Protecting Web Forms with AJAX
    - Using Prototip with AJAX
    - Using Prototip
    - Using the google.load() Method with Google`s...
    - How to Handle Ajax Errors
    - Uncompressing Source Files with Google`s AJA...
    - Using the jQuery Framework with Google`s Aja...
    - Using Google`s Ajax Libraries API




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek