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

Sameer Borate's Blog: Simulating Packages in PHP

NetTuts.com: Working With Databases in Symfony 2

JSLabs Blog: How to write an image gallery script in PHP

Matthew Weier O'Phinney: ZF2 Modules Quickstart (Screencast)

PHPro.org: Tutorial - Reciprocal Links


Community Events





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


podcast introduction release interview opinion symfony2 laravel framework code developer configure list threedevsandamaybe language refactor install community series unittest testing

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