A Beginner’s AJAX Tutorial – What Is AJAX

published in: Ajax Programming

PDF File size: 235.44 Kb
PDF Source: www.handyphp.com
Tags:
Share this info:
Bookmark and Share

File Review:

What Is AJAX – A Beginner’s AJAX Tutorial. Written by Handy PHP Administrator. Monday, 21 September 2009 22:36 – Last Updated Monday, 21 September 2009 23: …

What Is AJAX – A Beginner’s AJAX Tutorial
Written by Handy PHP Administrator Monday, 21 September 2009 22:36 – Last Updated Monday, 21 September 2009 23:11

What is AJAX?

Well, AJAX stands for asynchronous JavaScript and XML. But that isn’t a fair explanation for what AJAX really is. In fact, AJAX isn’t a very good name (acronym) for this method of scripting. It is true that asynchronous JavaScript functions work very well with XML but generally this method is used in conjunction with a server side script written in ASP or PHP. These server side scripts generally access a database such as MySQL to send and retrieve data to and from the web browser.

Chances are very good that you have used an AJAX script at some point in time… Ever filled in a text form that offered suggestions as youe typed, well that was AJAX. Blogs and forums that offer a spell checker that you can right click on use AJAX. Forms that submit data but the page doesn’t completely reload use AJAX.

Here’s how it works… The webpage you are viewing has one or more JavaScripts running. When you do something that the JavaScript is programed to respond to, it gathers whatever data it needs and sends it to a server side script (PHP script). That script reads the request and the data that accompanied it and manipultes the data however it is programmed to do such as searching the database for new data. After the server side script has finished processing the request, it send a responce back to the JavaScript. The JavaScript uses the data sent to it to make some change on the webpage. That could have been something like registering for the website without leaving the page you started on.

1/1

By clicking "Read This File" button, you agree with our Terms of Service and Disclaimer.