to be more precise :
$ajax->div('events');
echo $ajax->remoteFunction(array('url' => '/events/index', 'update' =>
'events'));
$ajax->divEnd('events');
Actually on initial load, you do not even need the $ajax->div /
divEnd, but maybe you would put them in your rendered view.
On Jun 28, 8:10 pm, francky06l <[EMAIL PROTECTED]> wrote:
> you can use $ajax->remoteFunction (check the syntax), into the div at
> initial load. This content will be updated by the result of your call.
> Hope this helps
>
> On Jun 28, 6:59 pm, "Howard Glynn" <[EMAIL PROTECTED]> wrote:
>
> > I think this is simple, but I'm not sure how it is done (my js/ajax is
> > a bit fuzzy, i rely on the helpers :-) I have a div, that is able to
> > add/edit/index etc update itself via the ajax helper functions - works
> > great.
>
> > However I can't find how you load it in the first instance within the
> > context of a bigger view?? If I create a temp $ajax->link and click
> > that link, it loads the first time and I'm up and running, but I need
> > it to load automatically within the main page.
>
> > I thought that something like...
>
> > $ajax->div('events', array('url', '/events/index'));
> > $ajax->divEnd();
>
> > ...in the main view would do this, but it doesn't do the first time
> > load. i'm using cake 1.2.0.5146alpha
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---