Creating a Google Suggest Application with an Ajax GET Request

Let's take what we've covered so far and build a useful application with it. Figure 16-8 shows a homemade interface to the Google search engine that works much like Google Suggest. As you can see in the figure, I've typed the first few letters of the word javascript, and the application is showing how many results would be returned by searches starting with those letters.

Searching for javascript in our version of Google Suggest

Figure 16-8. Searching for javascript in our version of Google Suggest

The page you see in Figure 16-8 is very similar to the translator example in Figure 15-10. In that example, we used Ajax to read a file containing ...

Get The Book of JavaScript, 2nd Edition 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.