Hi. I am using cake 1.2.7.

About my problem, i finally can use javascript in modalbox, but i had
to do many changes.

First: i cant use these following code inside modalpages
         echo $javascript->link(<filename>, false), echo $javascript-
>link(<filename>, true) and echo $javascript-
>codeBlock( function() ..., false).

When i put codes above, the scripts havent loaded by pages, they even
appear in html. So, what i've done to fix it and use jtreeview was to
call all .js outside modalpage and, inside it i've put this:

echo $javascript->codeBlock( function()... , TRUE).

It works perfectly.

On 4 ago, 15:49, cricket <[email protected]> wrote:
> On Wed, Aug 4, 2010 at 1:45 PM, Persivo Cunha <[email protected]> wrote:
> > sorry, i wrote .js wrong. It still doen't work inside modalbox, but
> > the correct code is
>
> > <?php
> >        $javascript->codeBlock("
> >                jQuery(function() {
> >                        alert('funciona');
> >                });
> >        ",array('inline'=>false));
> > ?>
>
> > About Firebug, in both cases (inline true or false), nothing appears.
> > That is why i know that the <script> is not called. I read something
> > about that in modalbox home page. They've talked about evalScripts,
> > but i didn't understand how to use.
>
> If you're using Cake 1.3.x it should be:
>
> $html->scriptBlock('your code here', array('inline' => false));

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

Reply via email to