User:Bill Flanagan/AjaxSearch

From OpenWetWare
Jump to: navigation, search

<html> <script src="http://www.google.com/jsapi?key=ABQIAAAAPs9cZ-kZ3XoJmvo0sgwmcBRBR1d1-G-H6KU-s0CvHzgrZV4bhBSUDaJzYhGfNZJefFhvnpbNEvp91g" type="text/javascript"></script> <script language="Javascript" type="text/javascript">

   //<![CDATA[
   google.load("search", "1");
   function OnLoad() {
     // Create a search control
     var searchControl = new google.search.SearchControl();
     // Add in a full set of searchers
     var localSearch = new google.search.LocalSearch();
     searchControl.addSearcher(localSearch);
     searchControl.addSearcher(new google.search.WebSearch());
     searchControl.addSearcher(new google.search.VideoSearch());
     searchControl.addSearcher(new google.search.BlogSearch());
     // Set the Local Search center point
     localSearch.setCenterPoint("Cambridge, MA");
     // Tell the searcher to draw itself and tell it where to attach
     searchControl.draw(document.getElementById("searchcontrol"));
     // Execute an inital search
     searchControl.execute("OpenWetWare");
   }
   google.setOnLoadCallback(OnLoad);
   //]]>

</script> <div id="searchcontrol">Loading...</div> </html>