If form_div and content_div are both rendered in the same view, you
could do some conditional logic tricks with $ajax->div and
$ajax->divEnd.

The other thing you could do is have your controller tell the view
which part to render based on whether or not the form validates, and
update the appropriate element manually in the onComplete callback of
the request.  You could embed a comment tag in the results that changes
based on which contents are returned, and grep the results for the
comment contents, and use that to figure out which div to update the
results with.

Otherwise, what you'd probably have to do is split it into to requests.
 The first one would be to see if the form validates, and the second
one to do the actual update, based on which div should be update.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to