PHP: Introduction to AJAXLocation: Articles > PHP > Here Like DHTML, Ajax is a combination of readily-available technologies that exist on the internet. The most important technology is Javascript, because it powers the entire concept. Other technologies used in Ajax applications are (X)HTML, CSS, and XML. Also, many Ajax applications use some type of server-side scripting language, such as PHP, Coldfusion, or ASP. Table of ContentsAjax HistoryWhile there were methods of using basic HTML and very little Javascript to implement Ajax-style web applications prior to the creation of a certain Javascript object, these were very basic and limited in their capability. The first Ajax-style applications used invisible iframes, usually of 1px by 1px height and width, to grab the data from the server. Then a Javascript function would get the source code of the iframe and parse through it to get any needed information. This Javascript would then put the needed information somewhere else on the page. While this served its purpose, it was very inelegant, and a better way was needed. The Ajax RevolutionThe Ajax Revolution, as I like to call it, actually started with Microsoft's notoriously in-secure ActiveX controls. Microsoft provided an ActiveX control that was called the XMLHTTP control. This control allowed a client Javascript application to make a direct connection to the server from which the page originated. It could the get the response from the server, including the page contents, and directly store this into a Javascript variable. The Javascript application could then set the contents of any HTML element that had an id to this response using the innerHTML property of almost all elements. Mozilla and other browsers eventually followed suit, but they provided a Javascript object instead of an ActiveX control. Today, I believe the following browsers support the XMLHTTP Request Object: Mozilla, Mozilla Firefox, Opera 8, Safari and IE 5+. Ajax TodayThere are many sites and applications that make use of Ajax. Google is also investing heavily in developing web applications with Ajax. Google Suggest, Gmail, and Google Maps all use various Ajax techniques to function. |