Hi All,

I am playing with Ajax in Cake more and more and I like it. I just
upgraded the Cake version and found out that we can update multiple Div
in a single ajax call.
I have seen here some topics about this, but none answer to my question
:

can we update multiple div in a controller action by returning a "view"
?

for example :

index.thtml

<div id="main_head">
      <h1>Main Head</h1>
</div>
<div id="sub_head">
      <h2>Sub head</h2>
</div>

<?php echo $ajax->link('test', '/app/test/, array('update' =>
array('main_head', 'sub_head')); ?>

now in the controller

function test()
{
      render('test', 'ajax');
}

in the test.thtml

<div id="main_head">         <!-- this is where I miss somehing, or
maybe not possible? -->
   <h1>Main Head Updated</h1>
</div>
<div id="sub_head>
   <h2>Sub head updated</h2>
</div>

Well I hope it's clear enough, any help to guide me would be great ..
Thanks


--~--~---------~--~----~------------~-------~--~----~
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