Google Site Search

Add AJAX-powered search capabilities to your site in seconds. Powered by Google.

CSS/JS files (add code to <HEAD> section):


<!-- DC Google Site Search CSS -->
<link rel="stylesheet" type="text/css" href="dreamcodes/site_search/css/tsc_sitesearch.css" />

<!-- jQuery Library (skip this step if already called on page ) -->
<script type="text/javascript" src="dreamcodes/jquery.min.js"></script> <!-- (do not call twice) -->

<!-- DC Google Site Search JS -->
<script src="dreamcodes/site_search/js/tsc_sitesearch.js"></script>

<!-- edit tsc_sitesearch.js and define domain to search under "siteURL" config variable -->
<!-- note: site must already be in the Google index for site search to work. -->

          

Google Site Search


Search This Site

  • Web
  • Images
  • News
  • Videos

View code:


<!-- DC Google Site Search Start -->
    <h3>Search This Site</h3>
    <form id="gsearchForm" method="post">
		<fieldset>
        
           	<input id="gsearch1" type="text" />
            
            <input type="submit" value="Submit" id="gsubmitButton" />
            
            <div id="searchInContainer">
                <input type="radio" name="check" value="site" id="searchSite" checked />
                <label for="searchSite" id="siteNameLabel">Search</label>
                
                <input type="radio" name="check" value="web" id="searchWeb" />
                <label for="searchWeb">Search The Web</label>
			</div>
                        
            <ul class="gsearch-icons">
                <li class="web" title="Web Search" data-searchType="web">Web</li>
                <li class="images" title="Image Search" data-searchType="images">Images</li>
                <li class="news" title="News Search" data-searchType="news">News</li>
                <li class="videos" title="Video Search" data-searchType="video">Videos</li>
            </ul>
            
        </fieldset>
    </form>

    <div id="resultsDiv"></div>
<!-- DC Google Site Search End -->

          


© TemplateAccess