News Feed
Sections




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

IBM developerWorks:
Developing PHP the Ajax way, Part 2 - Back, Forward, Reload
June 08, 2006 @ 06:04:23

IBM developerWorks has posted the second part of their series covering the development of PHP and Ajax to create a photo gallery application. In this part, they work off of the gallery already created in part one, taking care of one issue that plagues Ajax application - the breaking of the back button.

A major challenge of Asynchronous JavaScript and XML (Ajax)-driven Web sites is the lack of a Back button. We will use JavaScript to create a history stack for the Ajax photo gallery built in Part 1 of this two-part "Developing PHP the Ajax way" series. This history stack will closely mirror the history utility found in Web browsers, and it will be used to provide Back, Forward, and Reload buttons for the application.

They start with a look at what it means to "save state" in the browser, including the use of the Back button to navigate between pages. Seeing that Ajax breaks this, they move ahead with a simple solution - creating an internal history stact for the application and use its own navigation methods. They provide some examples images to use and all of the code you'll need to accomplish this.

They create a class using the popular Prototype javascript library to create functions like do_add, do_back, and do_forward to correctly handle the adding and deleting of the items from the stack. Once that script is developed, they take and integrate it back with the photo gallery from part one.

0 comments voice your opinion now!
ajax developing tutorial part2 photo gallery back button history ajax developing tutorial part2 photo gallery back button history


blog comments powered by Disqus

Similar Posts

Gonzalo Ayuso: Sending automated emails with PHP, Swiftmailer and Twig

WebReference.com: How to Create a Search Feature with PHP and MySQL

Sameer Borate's Blog: Beautifying XML documents

Richard Thomas' Blog: Solar Framework Shorts - Using Multiple auth adapters

Zend Developer Zone: Scalability and Responsiveness with Zend Platform's Job Queue


Community Events

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


list application language series yii2 laravel php7 community framework interview project opinion example part2 introduction testing symfony api podcast composer

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