News Feed
Sections




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

Daniel Hofstetter's Blog:
How to update multiple divs with Ajax
June 30, 2006 @ 05:55:40

On the Cake Baker blog today, Daniel Hofstetter shows us how to update the contents of multiple div tags with a little help from Ajax:

This is a question which arises from time to time in the CakePHP google group. There is an example in the group, but I have to admit I didn't understood it the first time I read it. So I try to provide a better example.

His example creates a view with the Ajax link and two divs inside to update - our containers. Next up is the controller, a simple matter of four lines to set which layout to use. And, lastly, they create another view, one to handle the actual updates to the two divs previously created. Using it is as simple as clicking on the link in the first view, populating the two divs with new information.

Be sure to check out the comments for other helpful hints and bug information (with Firefox).

0 comments voice your opinion now!
ajax cakephp framework multiple tags div content view controller ajax cakephp framework multiple tags div content view controller


blog comments powered by Disqus

Similar Posts

Jacob Santos' Blog: Patterns for PHP: Page Controller Draft

ServerGrove Blog: Configuring Symfony to use Zend Framework 1.8.0 new Autoloader

Felix Geisendorfer's Blog: Exceptional Cake

Felix Geisendorfer's Blog: Bringing the cold war to CakePHP 1.2 - The Containable Behavior

Community News: Symfony Project's "One Day One Ticket" Contest


Community Events





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


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

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