You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Philippe Guillard <pg...@citycita.net> on 2005/07/06 20:37:24 UTC
AJAX in CForms for response
Hi,
I checked the AJAX samples today : Great for use with
repeater/unions/selction-lists. I also understand i get there some cform
validation before submit!.
I have another case in mind:
A lightweight form may contain a few simple fields, and often the
response page would be nothing more than this : "OK, successfully
saved!". That would be the perfect use case of another XHR call...
I detected the point in cforms.js where the form has been validated and
a response header X-cocoon-ajax=continue is received. There i could add
another request that could launch the continuation, then flow would
process things and end with a cocoon.sendPage() rendering XML or even
text response.
I'd like to know what people here think about this, specially because i
don't see if it would be a good practice to launch the continuation from
a XHR call, though it should work if it contains the right continuation.
Regards,
Phil