Hi Lucca,

Thanks for your replies,

Could you advise me how I could use it in the layout file?

Is it acceptable to do:

App::import('Ajax');

then

$ajax->remoteFunction() ?

Cheers,
Bailey

On Mar 18, 4:15 pm, Lucca Mordente <[email protected]> wrote:
> and yes, you can use the ajax helper inside a layout file!
>
> On 18 mar, 13:12, Lucca Mordente <[email protected]> wrote:
>
> > Do you want to show news updated via Ajax every time interval?
>
> > to simply call an ajax function on page load, this might be 
> > useful:http://book.cakephp.org/view/626/remoteFunction
>
> > to call it within a time interval you must wrap the php code in a
> > javascript function and use javascript setInterval function.
>
> > On 18 mar, 09:44, Bailey <[email protected]> wrote:
>
> > > Hi all,
>
> > > I have a question surrounding embedding ajax results inside the
> > > layout.
>
> > > Everywhere you go on my cake site i want the user to always see in the
> > > footer of my layout file a dynamic set of results, such as a news feed
> > > that'll i'll implement using ajax.
>
> > > so in my layout.ctp file i have (simplified):
>
> > > <div id="header">Welcome to my site..</div>
>
> > > <div id="content"><?php echo $content_for_layout ?></div>
>
> > > <div id="footer">//ajax results</div>
>
> > > So i want to write an ajax function that will always be updating the
> > > footer div with a list of results, but the question is how would i set
> > > up the ajax in a similar manner to how i'd set it up in a view..
> > > obviously i can't use the ajax helper in the layout file (or can i?)
> > > or in say an element..
>
> > > Could anyone give some advice?
>
> > > Kind regards,
> > > Bailey

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to