Re: Updating multiple DIVs with Ajax (choosing on the server)
As long as all the div's you might want to update are in the header, just use $ajax->div/$ajax->divEnd to wrap the content for each div you want to update. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Updating multiple DIVs with Ajax (choosing on the server)
On Fri, 07 Jul 2006 11:38:09 -0700 "nate" <[EMAIL PROTECTED]> wrote: > Yes and no. You can render all the div's you want, but they'll only be > sent to the client if they're included in the header that provides the > id's of the elements to be updated. No problem with that. In my remote calls i will always pass both divs to be updated. What i want is to be able to selectively update a subset of the divs (or all of them) based on some conditions. How can i do that? Thanks in advance. -- Gonçalo Marrafa <[EMAIL PROTECTED]> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Updating multiple DIVs with Ajax (choosing on the server)
Yes and no. You can render all the div's you want, but they'll only be sent to the client if they're included in the header that provides the id's of the elements to be updated. The only other thing you could do is emulate Cake's built-in mechanism for updating multiple div's, and output everything manually. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Updating multiple DIVs with Ajax (choosing on the server)
Hi. Using Ajax, is there a way of choosing which divs are updated, on the server side? For example: in view: $ajax->div('one'); div one! $ajax->divEnd('one'); $ajax->div('two'); div two! $ajax->divEnd('two'); in controller: function test () { if (!empty($this->data) && $this->Model->save($this->data)) { update_divs_one_and_two; } else { update_only_div_one; } } Can something like this be done? Thanks in advance. -- Gonçalo Marrafa <[EMAIL PROTECTED]> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---