AJAX (Asynchronous JavaScript and XML) is a JavaScript mechanism used to request data, normally in XML format, from which a page can be updated. We can use AJAX in our Joomla! extensions in a bid to improve the user experience.
Joomla! does not include any support specifically for AJAX. However, Joomla! does include the lightweight JavaScript framework, MooTools
. This framework includes useful client-side features for handling AJAX.
Note
Please note that the version of MooTools that is included with Joomla! is 1.1.1 for all releases up to and including Joomla! 1.5.13. From version 1.5.14 and later MooTools 1.1.2 is included. The latest major release of MooTools is 1.2, which is not compatible with the versions included with Joomla! 1.5. Replacing the included versions with the latest version will cause significant problems and is not advised.
Before we delve into the intricacies of JavaScript, let us take a look at how we respond to an AJAX request. This may seem like a step backwards,...