See my reply in the topic: How to update a View-DIV and an element at 
once with Ajax-Submit-Button?
In your case solution 2 might be the better option or you could just 
write the js manually to update both divs
i.e. something of the order:
<input .... onclick="update2divs(parameters)">
And js:
function update2divs(parameters) {
    ajaxupdate('div1','url');
    ajaxupdate('div2','url2');
}
Or read more on js and AJAX and you'll find the possibilities are numerous.

Now if only I could my brain out of it's writers block to solve my own 
problem.

Jeremy

[EMAIL PROTECTED] wrote:
> Sorry, I wasn't very clear.  I actually do have the DIVs in elements
> and render them within my layouts.  But I still may be doing it
> incorrectly.
>
> Basically, I have a special statistics DIV that needs to update with
> statistics and possibly other bits of data and I'd like to position it
> absolutely to the entire application so I've rendered it in /layout/
> default.ctp.  But the rest of the application is in a container and is
> in it's /views/controller/action.ctp layout.
>
> So I'd like to have a link that updates the application layout but
> then updates the little statistics DIV in the default.ctp layout.
>
> I could put it in the /views/controller/action.ctp and then put a
> negative CSS top and left value on it to move it to the corner but I
> wanted to inquire if there was a way to do this with the Ajax helper
> and keep it in the default.ctp then just update it.  I thought perhaps
> in the controller I could do:
>
> $this->render(array('layout1','default'), 'ajax');
>
> Thanks for your help!
> Wilson
>
> On Jun 21, 1:48 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
>   
>> On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>>     
>>> Thanks Chris.  Yes, I've looked throughout, but the only answers I've
>>> found pertain to changing DIVs in one layout.
>>>       
>>> Have a nice day.
>>>       
>> Why are you trying to render two layouts at the same time?  And why
>> would you put dynamic code in your layout when it should be in an
>> element?
>>
>> --
>> Chris Hartjes
>> Senior Developer
>> Cake Development Corporation
>>
>> My motto for 2007:  "Just build it, damnit!"
>>
>> @TheBallpark -http://www.littlehart.net/attheballpark
>> @TheKeyboard -http://www.littlehart.net/atthekeyboard
>>     
>
>
> >   


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to