Archive for May 16th, 2008
Started something new, Google AJAX API!
Well its been long i have tried something new or learn something new …. Today i started with Google’s AJAX Search API . I started with simple local search using simple search and i learned how to embed samething in my blog see this example : http://madhucm.blogspot.com.
I would have included in this blog but i dont know how to edit <body> tag. And also it doesn’t allow you to do … well it doesn’t matter however.
The first thing i did was getting the JAX Search API key so that it is valid within a single directory on your web server. And after getting the key, i tweaked my blog template , and finally included the script. Well if you know javascript it damn easy to create you own search.
ex: var localSearch = new google.search.LocalSearch();
searchControl.addSearcher(localSearch); // This is local search
searchControl.addSearcher(new google.search.WebSearch()); // search on web
searchControl.addSearcher(new google.search.VideoSearch()); // video search
searchControl.addSearcher(new google.search.BlogSearch()); // blog search….
You can also customize your view , like :- TABBED, LINEAR .
// create a drawOptions object var drawOptions = new GdrawOptions(); // tell the searcher to draw itself in linear mode drawOptions.setDrawMode(GSearchControl.DRAW_MODE_LINEAR); or drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED); searchControl.draw(element, drawOptions);
more info:http://code.google.com/apis/ajaxsearch/
1 comment May 16, 2008
