Using the Wizards to Generate Code
The folks who brought us the Google Ajax Search API also provide several code wizards to help you get started quickly (see http://code.google.com/apis/Ajaxsearch/wizards.html). Rather than writing the code yourself, all you have to do is input a little custom information, and the code is generated for you. There are wizards for news, book and video bars, and for map and video search. The following subsections briefly describe each of the available wizards.
For each of the code areas, we’re going to cover how to generate the code with wizards. That’s enough to get you started. However, each area also has a programming guide which will lead you through the code in more detail. Our recommendation is to generate the code with the wizards first, then check out the programming guide to fine tune the code later.
Let’s start with the news bar wizard and go into a little detail on it. I won’t go into as much detail with the other wizards, but the description of the news bar wizard should give you enough feel for the others, that you will get along just fine. (Frankly, for each of the code areas, there is almost enough material to write a Short Cut on each one!)
In each of the code examples you will see a pattern. The code is highlighted to emphasize this pattern in each listing. The listings each contain the following:
A
div
element container with an appropriate ID.A link to the Google Ajax Search JavaScript code, with your key.
A link to the Google Ajax Search ...
Get Google Ajax Search API 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.