Thursday, March 5, 2009

Google Search Webpart in sharepoint


Below is a cheap way to get a Google search on your site:
1. Navigate to C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS

2. Create a new folder called "external"

3. Inside the folder create a single HTML page with the following contents:

<FORM method=GET action="http://www.google.com/search"
target="_blank">
<A HREF="http://www.google.com/" target="_blank">
<IMG SRC="http://www.google.com/logos/Logo_40wht.gif" border="0"
align="absmiddle"></A>
<INPUT TYPE=text name=q size=30 maxlength=255 value="">
<INPUT type=submit name=btnG VALUE="Google Search" style="font-
size:10">
</FORM>


4. Save the file as "googlesearch.htm"

5. Next drop a Page Viewer Web Part onto your page and point it to the page you created. The url to the page will be http://tushar/_layouts/external/google.htm

Cheers it and enjoy it.