How to handle the server response?

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