Saturday, 25 June 2011

Add Google Search Box To Your WebSite -- By Techno Ramayan

Hi!..Today I am gonna tell you how you can add google Search box to your is very easy lets see how it is actually done..
First off, the good news. Google itself actually has a nice page offering you HTML code you can just cut and paste onto your own Web pages to produce the search box you seek, and some variants beside. Just check out Google Free

If you wanted to look at your own custom search then just do that.. It would be nice that you edit the source code so that it suits to your site. Let’s do that

Let me tell you first that to google search engine uses a variable for this search is “sitesearch” . Set it to a null value and you're searching the entire World Wide Web, but set it to a specific domain and it's constrained exactly as if you had typed in the Google special notation site:domain”.

Second, you need an input field and a submit button. Put them all together and here's the minimalist Google search form that lets the user alternate between just your site (well, in this case just my site) or the entire Web:

<form method="get" action="">
<div style="border:1px solid black;padding:4px;width:20em;">
<table border="0" cellpadding="0" bordercolor="#FF8040" bgcolor="#FFFF80">
<input type="text"   name="q" size="25"
 maxlength="255" value="" />
<input type="submit" value="Google Search" /></td></tr>
<tr><td align="center" style="font-size:75%">
<input type="checkbox"  name="sitesearch"
value="" checked />search Techno Ramayan Only<br/>
Output will look like this as image

If you'd like to use this on your own site, simply change the occurrences of as appropriate.
If you want that search results open in a new tab/window then just add target=”_blank”
Into FORM tag.
Thanks for reading and keep visiting
If any query then feel free to comment here..