Integration with AJAX for PHP development

Source: Internet
Author: User
Asynchronous JavaScript and XML (AsynchronousJavaScriptandXML, Ajax) is undoubtedly the most popular new Web skills. In this article, we will use PHP and SimpleAjaxToolkit (Sajax) to create a simple album as an online Web application. Our first Asynchronous JavaScript and XML (Asynchronous JavaScript and XML, Ajax) is undoubtedly the most popular new Web skills. In this article, we will use PHP and Simple Ajax Toolkit (Sajax) to create a Simple album as an online Web application. We first use the PHP development method of the scale to write a simple album, and then use Sajax to turn it into a Web application of motion.

   Create a simple album

This article uses two methods to create a simple Album: traditional Web application and Sajax-based application. We will write an album in PHP, read the content in a directory, and display a table composed of thumbnails. If you click a thumbnail, the image is fully expanded. Because traditional exploitation programs are compiled, each click is a new HTTP request, and parameters are transmitted as part of the URL.

You will learn how to use the Sajax library for photo albums and how the application of Sajax can accelerate the development of exploitation programs.

   Add a page Sharer table

Users who visit the album need to quickly view the photos. Because many large photos are not easily displayed on one page, you need to create a simple table that displays a small number of thumbnails each time. You also need to write navigation to help you move back and forth in the image list.

 
Figure 1. the page splitter provides a method for displaying user photos


   What is OpenAjax Alliance?

Before the beginning of JavaOne Conference in May 2006, representatives of 29 companies met in the Conference room of Adobe Systems to determine the future of Ajax in general. this group is called OpenAjax Alliance.

The group made several decisions, the most obvious of which was to name itself: OpenAjax Alliance. It also decided not to organize itself into a formal scale group, or an open source-dominated organization like the Eclipse Foundation. Therefore, the situation of the group itself is also informal for the time being. The group approves the convening of approximately one teleconference every week.

OpenAjax Alliance focuses on three important aspects: the risk of Ajax is reduced through supply mutual control, and the Ajax solution ensures that the open source code technology and open source code are adopted to ensure the openness of the Web. The first task of the group was to find a way to establish and maintain mutual control between Ajax tools.

OpenAjax Alliance contains 31 technical companies, including IBM? , Adobe Systems, Eclipse Foundation, Google, Laszlo Systems Inc., Oracle, Red Hat Inc., and Zend Technologies Ltd ..

First, collect at least 20. jpg images and put them in a folder. Each image also has a thumbnail retained in a separate thumbnail folder. Although the GD software package can be applied to a natural thumbnail (see references), this article assumes that the thumbnail has been prepared. You can also apply the photos and thumbnails provided in this article (see download ).

To complete the remaining part of the capital text, we assume that the photos are kept in the/images subdirectory, and the thumbnails are placed in/images/thumbnails. You can make appropriate corrections in the code. In addition, we also assume that the same name is applied to the thumbnail and the corresponding image.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.