Tuesday, 22 October 2013

Add search to your site

 Add search to your site

 Once you've created your custom search engine, you can add the Custom Search element to your site so that visitors can use it. To do this, you'll need to copy some code and paste it into your site's HTML where you want your search engine to appear.

<form method="get" action="GoogleSearch.htm" target="_top">
    <table border="0" align="right" cellpadding="0" cellspacing="0">
        <tr>
            <td height="38" align="left" valign="top" nowrap="nowrap">
                <input type="text" name="q" size="31" maxlength="200" value="" id="input1" class="inputboxgoogle" />
            </td>
            <td align="left" valign="top" nowrap="nowrap">
                <input name="sa" type="image" src="images/Logo_25blk.gif" alt="Google" id="input2" />
                <input type="hidden" name="client" value="pub-9919055307302416" />
                <input type="hidden" name="forid" value="1" />
                <input type="hidden" name="ie" value="ISO-8859-1" />
                <input type="hidden" name="oe" value="ISO-8859-1" />
                <input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:11" />
                <input type="hidden" name="hl" value="en" />
            </td>
        </tr>
    </table>
    </form>
    <!-- Google Search Result Snippet Begins -->
    <div id="googleSearchUnitIframe">
    </div>
    <script type="text/javascript">
        var googleSearchIframeName = 'googleSearchUnitIframe';
        var googleSearchFrameWidth = 765;
        var googleSearchFrameborder = 0;
        var googleSearchDomain = 'www.google.co.in';
    </script>
    <script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js">  </script>

1 comment: