New Blog Search

I have installed new Google Search AJAX API. If you are using non-Javascript and non-embeddable browser such as lynx/elinks/dillo, the search is in the left toolbar. Now, you can search my blog easily.

The script is simple and you can implements yours. Just sign in to Google Search AJAX API and it will generate a key, use the key for accessing the library. Want more? Visit this to sign up (you must have a google account first).

See the examples. Dear Lazy web, here's how I did:

1# I go to Layout -> Edit HTML. I add this to the code in head section:

[script src='$YOUR_GENERATED_KEY_HERE" type='text/javascript/]
[script language='Javascript' type='text/javascript']
google.load("search", "1");

function OnLoad() {
// Create a search control
var searchControl = new;

// Add in a full set of searchers
// site restricted blog search
var blogSearch = new GblogSearch();
blogSearch.setUserDefinedLabel("JP Was Here!!!");

// Tell the searcher to draw itself and tell it where to attach

// Execute an inital search
// searchControl.execute("install");


Then, I save the code. If you pay attention, I only modify the example with stripping it down and left only the thing that I need. But, it can be installed with other things like video search etc. Btw, don't forget to change the $YOUR_GENERATED_KEY_HERE with your key and change the restriction with your own blog.

#2 Then go to Layout -> Page Elements. To add a widget container for our blog, click on "Add a Page Element" and choose the "HTML/JavaScript" part. Put this on the widget's content:

[div id="searchcontrol"]Loading...[/div]

and save it. Done.

Because of the restriction of Blogger, I think you could just see my page's source code.



Popular Posts