Because the you are using the javascript helper in your default layout
you need to include the javascript helper all your controllers or
alternatively add it to the AppController.

In /app/app_controller.php add

var $helpers = array('Html', 'Form' , 'Ajax', 'Javascript');

This will make all the helpers available to every view including the
default layout.
On Jun 2, 11:23 am, rtanz <[EMAIL PROTECTED]> wrote:
> i have that in my application but still im getting those errors, im
> stumped :S
>
> GeoffFordwrote:
> > Actually that should have been $helpers = array('Javascript') not
> > $components
>
> > On Jun 1, 1:22 pm, rtanz <[EMAIL PROTECTED]> wrote:
> > > Hi i am trying to complete the ajax todo list tutorial 
> > > athttp://grahambird.co.uk/cake/tutorials/ajax.php
>
> > > However i am getting this error after editing the default.thtml file
> > > in layouts folder:
>
> > > Notice: Undefined variable: javascript in W:\www\cake\cake\libs\view
> > > \templates\layouts\default.thtml on line 35
>
> > > Fatal error: Call to a member function link() on a non-object in W:\www
> > > \cake\cake\libs\view\templates\layouts\default.thtml on line 35
>
> > > I inserted the following code into the head section as required:
>
> > > <?php print $html->charsetTag('UTF-8') ?>
> > > <?php print $javascript->link('prototype') ?> //line35
> > > <?php print $javascript->link('scriptaculous.js?load=effects') ?>
>
> > > any idea why i have this problem? thanks


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