You are probably just missing the
<?php echo $scripts_for_layout; ?>
in your layout (so it knows where to put these javascript links you
add in the view).  Some more details at
http://cakebaker.42dh.com/2007/02/21/referencing-javascript-files/

Personally I use a modified version of RosSoft's HeadHelper, as this
has more functionality which I find useful.
http://rossoft.wordpress.com/2006/03/28/register-head-tags-from-helpers-2/


On Jun 30, 8:40 am, "Paul R. Zwiers" <[EMAIL PROTECTED]> wrote:
> Can't seem to tackle this very simple issue, I must be overseeing
> something. Using latest Cake 1.2.
>
> I have in my controller:
> var $helpers = array('Html', 'Form', 'Fck', 'Javascript' );
>
> In one particular View I wanted to include a javascript file which needed
> to go to the head section. Since I do not need it on every page I did not
> want to put it in the Layout.
>
> So I thought I use the following in my View:
> echo $javascript->link('prototype.js', false );
>
> Which according to the API should put the correct link in the head
> section. But nothing happens. Nothing shows up anywhere.
>
> When I use a simple
> echo $javascript->link('prototype.js');
> (without the "false")
>
> I now shows up in the view as a correct link. But it needs to go in the
> head.
>
> What am i overlooking?
>
> TIA
> Paul


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to