Posted By

LeeRJohnson on 11/09/08


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

carlosabargues
vali29
LeeRJohnson


Unobtrusive Google Custom Search


 / Published in: HTML
 

  1. <div id="site-search" class="box">
  2. <div class="hd">
  3. <h1>Site Search</h1>
  4. <form id="cse-search-box" action="http://google.com">
  5. <input type="hidden" name="cref" value="http://yourdomain.com/cref-cse.xml" />
  6. <input type="hidden" name="cof" value="FORID:11" />
  7. <input type="text" name="q" tabindex="0" />
  8. <button class="cmd" type="submit" name="sa" value="Search" accesskey="s" >
  9. <strong class="accesskey">S</strong>earch
  10. </button>
  11. </form>
  12. </div>
  13. <div id="cse-search-results" class="bd"></div>
  14. <div class="ft">
  15. <!-- Google CSE Init -->
  16. <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
  17. <script type="text/javascript">
  18. var cseSearchResultsHost = "";
  19. var googleSearchIframeName = "cse-search-results";
  20. var googleSearchFormName = "cse-search-box";
  21. var googleSearchFrameWidth = 800;
  22. var googleSearchDomain = "www.google.com";
  23. var googleSearchPath = "/cse";
  24. document.getElementById(googleSearchFormName).action = cseSearchResultsHost;
  25. </script>
  26. <script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>
  27. <!-- End CSE Init -->
  28. <p>Powered by Google Custom Search.</p>
  29. </div>
  30. </div>

Report this snippet  

You need to login to post a comment.