News Feed
Jobs Feed
Sections




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!
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

EasyTech Blog: Executing PL/SQL code in Zend Framework

PHPSnippets.info: Convert currencies using PHP, Google and cURL

Slawek's Blog: Efficient file serving in PHP application with nginx

php|architect: Application-level Logging with the Zend Framework

MaltBlue.com: Zend Form Mastery with Zend_Config - Part 2, Core Form Configuration


Community Events











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


release community functional podcast unittest introduction object zendframework2 opinion language application interview phpunit series tool development example testing framework code

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