[Seaside] Ajax Callback with Response Code other than 200

jtuchel at objektfabrik.de jtuchel at objektfabrik.de
Tue Dec 31 14:30:14 UTC 2013

Hi again,

thinking a bit more about my X-editable plans, I dug a bit deeper into 
JQAjax. Unfortunately, this gives me more questions than answers ;-)

Say I have an ajax callback using jquery like this:

html anchor
id: 'mylink';
onClick: (html jQuery  ajax callback: [self doSomething]);
with: 'Click here'.

This callback will always respond with an empty HTTP response with 
status code 200, right?
There are other callback methods on JQAjax, like respond:, text: and so on.

Is there any documentation on these?

I am looking for a way to transport some value to a server-side callback 
block and respond with one of these two options:

a) HTTP 200 and a JSON document with success information and probably an 
error message
b) HTTP 200 if the callback processed without errors, or a different 
HTTP code and some error text in the response's body if there is some 
error during processing the callback

Has anybody done this? Any pointers to more details?

Thanks in advance and happy new year to all Seasiders!


Objektfabrik Joachim Tuchel          mailto:jtuchel at objektfabrik.de
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1

More information about the seaside mailing list