Internetz

Use the JavaScript of Ajax through PHP and Sajax

Old since, found have the Web application program that answers a gender truly block up of place of a when this one target is developed by Web all the time simple fact: Want to change the message of page some part, user must burden is whole page. But meet no longer later such. Thank asynchronous Java? Script and XML (Ajax) , we can request new content from server end now, revise the one part of the page only. This tutorial explained how to use Ajax at PHP, introduced simple Ajax kit (Sajax) , this is a tool that writes with PHP, can carry the server PHP and Javascript are compositive.

Before beginning

What this tutorial is aimed at is the person that process of application of rich to development Web is interested in, process of rich Web application mixes asynchronous JavaScript XML (Ajax) with PHP union rises, when the user is clicked every time, need not refresh is whole page, with respect to OK and dynamic newer content. This tutorial assumes the reader realizes basic PHP idea, include the use of If and Switch statement and function.

About this tutorial

In this tutorial, study Ajax and the issue that use around it. Will propose program of an Ajax application with PHP compose, show the face plate in a tutorial that writes before. Click face plate link to be able to be record in content area afresh only, the content that uses face plate of make choice of replaces it, thereby managing the time that bandwidth and page load. Next will simple Ajax kit (Sajax) compositive use a program into Ajax, it is OK and synchronous the use of Ajax, simplify thereby development.

Overview

Before development, see PHP of Ajax, give typical examples apply program and Sajax first. Ajax

Ajax allows Web to develop personnel to found interactive Web page, avoid to must await a page to be record in this one bottleneck at the same time. Use a program through what Ajax founds, need to click pushbutton only, with respect to the content that can replace area of Web page some with brand-new content. Its wonderful part depends on need not awaiting a page to load, only the content of this one area needs to load. It is with Google Maps exemple: Can be clicked and move everywhere map, need not await a page to load however.

The problem of Ajax

When use Ajax some things need to notice. Like other Web page, ajax page can add a title label pasted on the cover of a Chinese-style thread-bound book, make the problem can be created when the request in use GET and POST so. The addition of internationalization and encode plan amount, make become these encode plan standardization increasingly important. These serious problems understand in this tutorial lieutenant general.

PHP of give typical examples uses a program

Want to establish an application program with Ajax above all, found with Sajax next, use the profit of this kit in order to show. Using a program is the one part in the tutorial that writes before, contain face plate link. It is used as give typical examples, use the dominant position of Ajax in order to reveal. When because be on each face plate,be being clicked, their meeting asynchronous is loaded, and the share that need not expect a page to remain is loaded again. Process of application of this give typical examples still can show the Ajax application program that how establishs his.

Sajax

If want to establish Ajax application program, do not want to suffer Ajax again complex detail place is tired. The answer is Sajax. Through using the warehouse that ModernMethod personnel develops, sajax developed personnel abstraction to give the high-level detail of Ajax for Web. In ground floor, the job of Sajax and Ajax are identical. But, through using the high-level function that Sajax library provides, the technicality of negligible Ajax.

What is Ajax?

This one is an introductory introduction, explain the idea of Ajax with give typical examples, included what to produce when clicking a link, the HTML of the need when Ajax is used at PHP application process and JavaScript code. Below one section general is a few more thorough, practically uses the Ajax idea that studies in this one to establish PHP application program.

Content of behind the curtain

Ajax is the combination of asynchronous JavaScript and XML. Say asynchronous, because can click the link on the page,be, next it is loaded only with the content that clicks correspondence, hold title at the same time or other the information of any set is not moved.

When clicking a link, what rearward works is JavaScript function. JavaScript establishs the target that corresponds with Web browser, tell a browser to load specific page. Can resemble browsing the other content on same page euqally usually next, when the browser loads new page completely, the browser can label in the Div of HTML designation position shows content.

Css style code is used establish a link together with Span mark.

CSS style code

Process of application of give typical examples needs CSS code, the anchor that such Span mark resemble using convention it seems that labels (پƒ A Href= . . . پ„ ) the true link that establish is same, also can resemble true link be being clicked euqally.

source: reviews5

Related Posts by Categories



No comments:

Post a Comment