Retrieving the Data Using AJAX

Now that you’ve seen how the requested data needs to be generated, you can use AJAX to request the data and display it using the SimplePlot library.

There are many effective ways for the server to send data to the client. Previous chapters showed how HTML data is sent from the server to the client in response to an AJAX request. While that could be done to send data to be charted, it would require that the HTML be generated on the server and then parsed in the client. This would use more CPU cycles than is strictly required.

The example that follows is a request for a different view of the inventory data seen in Chapter 7. While the table-like view of inventory can be of great importance, if the inventory grows ...

Get Oracle Database Ajax & PHP Web Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.