Prev | Current Page 83 | Next

Larry Ullman

"Building a Web Site with Ajax: Visual QuickProject Guide"


??? Running a dynamically generated
query through another interface,
like the mysql client in
the image, is a great debugging
technique. Doing so will confi rm
what a query is, if it works, and
what its results are.
creating a search 97
This page intentionally left blank
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 Ajaxsupportive
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 fi le that contains all the functionality for this
specifi c 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 to update the
Web page. Here, we??™ll add nodes to the Document Object Model as a way of
manipulating the page??™s content.


Pages:
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95