The sample application discussed in the preceding sections is a basic example, of course. Nevertheless, it shows you how to use the XMLHttpRequest
JavaScript class to make asynchronous calls to PHP/Oracle scripts.
In the following sections, you will build a more complex sample application showing how to make a PHP/Oracle application more responsive and dynamic with the help of AJAX.
In the preceding sample, you use AJAX to automatically update a page displaying some rapidly changing data stored in the database, actually updating a few numbers on the page. Of course, you might use AJAX to solve more complicated tasks. For example, you might implement an AJAX-based solution that makes the database generate blocks of well‑formed HTML code and then dynamically insert those blocks in the browser's HTML tree, significantly updating the loaded page without actually performing a full reload. Fortunately...