[FX.php List] Server is busy...please try again

Dale Bengston dbengston at tds.net
Tue Nov 9 09:06:30 MST 2010


Uhhh, well, this is sorta the core of my sites. I hardly ever just post a form submit and reload an entire page. 

There are as many ways to make an ajax call as there are web developers. The gist of it is, if you're using AJAX with JQuery or Scriptaculous or MooTools or Prototype or whatever, you evaluate the status code that's returned as part of the XMLHttpRequest object. These are the same status codes that you get with HTTP requests. A full list is here:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

A timeout status can be trapped out of the AJAX response, and a more gentle message displayed back to your page if it's an error code. If it's a "good" code, proceed with displaying the results of your FX query.

Disclaimer: there's no such thing as a foolproof HTTP or XMLHttpRequest transaction between a user's browser and a web server, even in the sense that it will retrieve an error. Using AJAX means you're probably not reloading the entire page, so the user does not lose context or get a big blank page if an error occurs. But you can never be 100% sure you'll get a response....

Dale


On Nov 9, 2010, at 9:43 AM, Jonathan Schwartz wrote:

> Example code?
> 
> At 9:32 AM -0600 11/9/10, Dale Bengston wrote:
>> This is exactly how I handle it.
>> Dale
>> 
>> On Nov 9, 2010, at 5:56 AM, Gjermund Gusland Thorsen wrote:
>> 
>>> My suggestions have mainly been about avoiding having to put the
>>> message "busy" on display, but if you really want it, please use ajax,
>>> the simplest way to do it is to make a loading display, so that it
>>> says "Loading ..." while it loads, and if it times out... make it turn
>>> into an error.
>>> 
>> > ggt
>>> 
>> 
> 
> 
> -- 
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-370-5011
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list