News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Debuggable Blog:
Passing controller variables to your JavaScript
August 27, 2008 @ 11:15:57

Felix Geisendorfer shares another helpful tip for CakePHP users out there - this time dealing with controller variables and Javascript.

If your application requires JavaScript in order to work than you have probably been looking for an efficient way to pass CakePHP controller variables to your scripts. I already mentioned this technique in my talk at CakeFest this year, but here is the full explanation.

His method sets up a new function in the controller that automatically pushes PHP arrays out to a Javascript block in your application's layout. The widget system makes it a simple process.

0 comments voice your opinion now!
controller variables javascript cakephp framework


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Zend Framework Site Gets Bug Tracker, Source Browser.

Reddit.com: Would you take a job where you had to use a custom MVC framework?

Kenny Katzgrau's Blog: Enable Site-Wide Profiling With CodeIgniter

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 9)

Ade Slade's Blog: Implementing Twitter sign-in with Silex and PHP


Community Events





Don't see your event here?
Let us know!


interview update api podcast introduction deployment zendserver tips symfony opinion framework package language laravel install release library unittest community series

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework