News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
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!
php ajax developing tutorial part2 photo gallery back button history php ajax developing tutorial part2 photo gallery back button history



Similar Posts

Pierre\'s Blog: What\'s new in GD, 5.1.x, #2

IBuildings Blog: Multithreading in PHP with CURL

PHPFreaks.com: Basic Pagination

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

Travis Swicegood: Fluent-API, here I come!


Community Events











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


cakephp releases database security PHP5 job framework zend release ajax PEAR book application zendframework code mysql conference package developer example

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