Tuesday, September 26, 2006

AJAX Search API Playground

The Google AJAX Search API has a number of well documented samples and solutions including the Video Search Solution and the Map Search Control Solution. Both of these solutions are great additions to a blog.
This morning, I modified a blogger template to include both of these solutions, as well as a core search solution. Fell free to take what I have done here and apply it to your blog, modifiy to meet your needs, etc. Just follow these instructions:
Sign up for a Google Ajax Search API Key and capture the key. For my blog, I used a url of http://ajaxsearch.blogspot.com
Download my modified template.
Edit the &key= values in the template where the Google Maps API and Ajax Search API are loaded and replace with your API Key (your key will work for both APIs).
Edit your blogger template, and replace or merge yours with mine. Note, mine is based on minima black.
Once you have got this going in your blog, you can do a few cool things:
Its very easy to include a hyper link in a blog post that results in a search on the map. Just create a the hyperlink as a javascript url that calls doMapSearch('search-term');. e.g., if you look at the resulting element, in "Edit HTML" mode, it will look something like this: Sakana. Here is an example: Sakana
Embedding core center column search is just like map searching only the function is doCoreSearch(); Here is an example: Google
Embedding video search links is just like map searching only the function is doVideoSearch(); Here is an example: Jimi Hendrix
Play around with this and let me know what you think.
p.s. - If you are a TypePad user, check out http://ajaxsearch.typepad.com

No comments: