Hi,
I don't know, but I think you're in the wrong way to call a js file. The
correct syntax (1.3.X) are:
<?php echo $this->Html->script('scriptjs'); ?>
Or you can use an array statement, like these:
<?php
echo $this->Html->script(array(
'jquery-1.6.1.min',
'jquery-ui.min'
);
?>
Would be nice if you put the js call in the layout. In this form, it
include the script in the $scripts_for_layout variable.
Regards
2011/7/5 Tilen Majerle <[email protected]>
> it works, if you use elements in your view, but if you use element in your
> layout then won't work, because $scripts_for_layout is set before element in
> rendered in layout
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
>
>
>
>
> 2011/7/5 K3 <[email protected]>
>
>> Hi,
>> how to include js(and css) file from element (to
>> $scripts_for_layout )?
>> i tried the usual way i use from a view:
>> <?php echo $this->Html->css('xxxx',null,array('inline'=>false)); ?>
>> <?php echo $javascript->link('xxxx.js',false); ?>
>> but it doesnt work. I wonder why?
>> Can anyone help me on this issue?
>>
>> Thanks
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> [email protected] For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php