Don't worry, figured out the remoteFunction parameters. It now does
exactly what I want.
<?php
echo $ajax->remoteFunction(array('url' => '/companies/get_subcats/',
'update' => 'box',
'with' => 'Form.Element.serialize(\'CompanyParentCategories\')'));
?>
Thanks for the heads-up,
Paul
On Jun 11, 11:56 pm, ReiToei <[EMAIL PROTECTED]> wrote:
> Hi Francky,
> Thanks for your reply...
>
> I'm having trouble with the serialize part. This is how the php
> snippet looks at the moment:
>
> <?php
> echo $ajax->remoteFunction(array('url' => '/companies/get_subcats/',
> 'update' => 'mydiv', 'with' => 'CompanyParentCategories'));
> ?>
>
> Where would I serialize the field? (CompanyParentCategories being
> field id)
>
> Thanks,
> Paul
>
> On Jun 11, 10:16 pm, francky06l <[EMAIL PROTECTED]> wrote:
>
> > If you mean that you want to call this update div, when the first time
> > the page is loaded, you can just place $ajax->remoteFunction (with
> > almost the same parameter, except the with -> serialize your field) at
> > first.
> > Even if I do not understand completely why you need to do this (since
> > you can "set" your div content for the first display), I think
> > remoteFunction will do it.
> > hth
>
> > On Jun 11, 10:29 pm, ReiToei <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > > I'm currently using the ajax helper in my view to create a chained
> > > select as follows.
>
> > > <?php
> > > echo $ajax->observeField(
> > > 'CompanyParentCategories',
> > > array(
> > > 'frequency' => '0',
> > > 'url' => '/companies/get_subcats/',
> > > 'update' => 'mydiv'
> > > )
> > > );
>
> > > ?>
>
> > > Is there any way I can use the helper to fire this request at the
> > > onLoad event? Is there some parameter I can add that will do this, or
> > > would I need to write my own function?
>
> > > Many thanks,
> > > Paul
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---