Thursday, April 1, 2010

Re: Undefined variable: javascript

Ive ran into that problem many times. Its usually not caused by
$javascript at all, its caused by Cake doing some weird auto magic
functionality. You need to remove components/helpers/etc and then add
them 1 by 1 till you figure out whats causing it.

On Mar 31, 11:39 pm, Jeremy Burns <jeremybu...@me.com> wrote:
> Try:
>
> $this->Html
> $this->Javascript
>
> Jeremy Burns
> jeremybu...@me.com
>
> On 1 Apr 2010, at 06:57, Ambika Kulkarni wrote:
>
> > Notice (8): Undefined variable: javascript [APP/views/layouts/
> > default.ctp, line 6]
> > Fatal error: Call to a member function link() on a non-object in /var/
> > www/cake/app/views/layouts/default.ctp on line 6
>
> > Controller Code is
> > var $components = array('Auth');
> > var $helpers = array('Javascript','Form','Html','Event');
>
> > default.ctp
> > <?php echo $html->css('datepicker')."\n"; ?>
> > <?php echo $javascript->link('datepicker.js')."\n"; ?>
>
> > $helpers array is defined only in AppController
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> > To unsubscribe, reply using "remove me" as the subject.

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: