7. enabling an Ajax search

As the last piece in this book’s project, let’s take the search created in the previous chapter and give it the old Ajax treatment. As in other chapters, we’ll add an Ajax layer on top of what we’ve already created. Browsers that are Ajax-supportive will see the search results without reloading the page; every other browser will use the system already in place.

Accomplishing this will require modifying the HTML page. Then we’ll need to make a new JavaScript file that contains all the functionality for this specific example. And a new PHP script will be written that returns the search results, in XML format, to the JavaScript. Unlike the other Ajax examples in this book, we won’t use the innerHTML attribute in our JavaScript ...

Get Building a Web Site with Ajax: Visual QuickProject Guide 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.