W3C home > Mailing lists > Public > www-forms@w3.org > September 2005

Re: How to handle the server response?

From: Daniel Swarbrick <daniel@pressure.net.nz>
Date: Tue, 27 Sep 2005 11:07:10 +1200
Message-ID: <43387F1E.2080009@pressure.net.nz>
To: Mark Birbeck <mark.birbeck@x-port.net>
CC: www-forms@w3.org

Mark Birbeck wrote:

> One other thing worth considering is, if you have control over the server
> code it might be worth returning an HTTP error code along with your XML.
> This will be picked up by the XForms processor and give you an
> xforms-submit-error, rather than an xforms-submit-done.

Mark, thanks for the detailed reply. I have a basic test setup working 
with a PHP script that basically just echoes back the values I submit, 
and my XForms output tags display this on the client.

Using PHP's header function, I am sending a 'HTTP/1.1 499 Validation 
Failed', but this doesn't fire the xforms-submit-error event. In fact, 
not even a 404 Not Found triggered the event. If I stopped the 
webserver, and tried to submit to a non-responsive server, the submit 
timed out and fired the xforms-submit-error event. I also found that a 
non-well-formed XML response also triggered the error event.

I still think your suggestion is a good idea, but it seems that 
Mozilla's XForms client doesn't consider a 404 to be a submit error.
Received on Monday, 26 September 2005 23:07:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:01 GMT