Thanks for your answers.
@rtconner:
actually I use something like (I have tried several syntax):
echo $javascript->codeBlock(null, array('inline' => true, 'allowCache'
=> false))
function myfunction(param){ .. }
echo $javascrip->endBlock();
@bingo:
I have tried to place it at the bottom, or at the top, does not seem
to make any difference .
Thanks again
On Feb 26, 1:54 am, bingo <[EMAIL PROTECTED]> wrote:
> also make sure that javascript tag is not the first line of your ajax
> view. use a dummy div something like
>
> <div heigh="0px"> </div>
>
> as the first line of your code and after that place the javascript tag
>
> On Feb 25, 6:58 pm, rtconner <[EMAIL PROTECTED]> wrote:
>
> > you using this syntax.. ?
>
> > myfunction = function(param) { ... }
>
> > On Feb 25, 3:49 pm, francky06l <[EMAIL PROTECTED]> wrote:
>
> > > Hi all,
>
> > > I am messing around for a while trying to set a javascript function in
> > > a view rendered with ajax call. I have played around with the
> > > cacheEvents, codeBlock (inline, allowCache) etc... but can't find a
> > > way to have this function inline for the view (I can make it inline
> > > for a specific event on an html part).. but I need it in several
> > > places ..
> > > I understand that because it's javascript it's evaluated and does not
> > > remain as "script" for the view after loading .. I guess I am missing
> > > something (its quite late here), any hints welcome..
>
> > > Thanks- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---