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

How to handle the server response?

From: Daniel Swarbrick <daniel@pressure.net.nz>
Date: Sun, 25 Sep 2005 22:10:14 +1200
Message-ID: <43367786.20703@pressure.net.nz>
To: www-forms@w3.org

Is it possible to interpret the server response in Javascript from a 
server response after xforms-submit-done?

My intention is to submit data (with replace=none) to a PHP script that 
attempts to insert a record into a database. However, if there is a 
database primary key violation, this needs to be reported to the xforms 
client, and an appropriate error displayed.

Or am I better to use some "output" tags in my document, and set 
replace=instance and instance=my-output-instance to display anything 
returned from the server upon submit?

I currently achieve this functionality with Ajax, using Javascript to 
parse a small XML document returned by the server containing server-side 
validation failure errors, and writeln() them to a div.
Received on Sunday, 25 September 2005 12:44:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:15 UTC