Monday, November 1, 2010

Re: cakephp 1.3.5 and jquery - what am i missing?

Friendly tip! I noticed you were editing the pages controller from
inside the cake folder. This is not recommended because if you try to
later upgrade your cake library, you'll most likely lose all the
changes you did to your pages controller! What you can do is copy the
pages_controller.php file to your /app/controllers/ folder, and it
will automatically take precedence over the basic cake one. That way
you can upgrade your cake folder with peace of mind in the future!

On Nov 1, 1:13 pm, Jeff T <j...@pre23.com> wrote:
> Thank you Cricket and Tilen.
>
> I got it working!
>
> Jeff
>
> On Oct 30, 8:00 pm, cricket <zijn.digi...@gmail.com> wrote:
>
>
>
>
>
>
>
> > On Sat, Oct 30, 2010 at 1:10 PM, Jeff T <j...@pre23.com> wrote:
> > > Hi All,
>
> > > I'm new to cakephp and it's clear there's something very basic that
> > > I'm missing.  I'm trying get jquery to work within cakephp.  I don't
> > > see any errors in firebug but it's clear that the js file is not
> > > processing, however the css file does.
>
> > Use Firebug to see if the javascript has even been loaded.
>
> > > I'm trying to get jquery working on my homepage.
>
> > > I have this in my default.ctp found at /vars/www/app/views/layout/
> > > default.ctp
>
> > > <link rel="stylesheet" type="text/css" href="/css/
> > > siteFeature.style_screen.css" />
> > > <?php echo $javascript->link(array('jquery-1.3.2.min.js',
> > > 'jquery.siteFeature.pack.js')); ?>
>
> > > the js files are found at:
>
> > > /vars/www/app/webroot/js/
>
> > > This is in my page_controller.php found at /vars/www/cake/libs/
> > > controller/pages_controller.php
>
> > > var $helpers = array('Html', 'Ajax', 'Session', 'Form', 'Html',
> > > 'Javascript', 'Time');
>
> > > Thank you and I hope someone can help me with this.
>
> > > Jeff
>
> > JavascriptHelper has been deprecated in 1.3.x so use
> > $this->Html->script(array('jquery-1.3.2.min',
> > 'jquery.siteFeature.pack'));
>
> > Note that you do not include the .js extension.
>
> > Also, if you're loading the JS in your layout, you should include
> > HtmlHelper in AppController so it's available to all controllers. And
> > you have Html listed twice above, btw.

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: