If you don't want the search to run right off the bat, you just need  
to comment out or remove the line reading  
searchControl.execute("lyponline");

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
http://jgeerdes.blogspot.com
http://jgeerdes.wordpress.com
[email protected]

Unless otherwise noted, any price quotes contained within this  
communication are given in US dollars.

If you're in the Des Moines, IA, area, check out Debra Heights  
Wesleyan Church!

And check out my blog, Adventures in Web Development, at 
http://jgeerdes.blogspot.com 
  !


On Mar 11, 2009, at 4:14 PM, JimF wrote:

>
> I have a site search I created starting with the 'Hello World'
> example  The only item left for me is not to have results appear until
> the 'search' button is selected.  What changes in the code below do I
> need to make?
>
> Thanks.
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml";>
>  <head>
>    <title>My Google AJAX Search API Application</title>
>    <script src="http://www.google.com/jsapi?key=mykey"; 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();
>         var siteSearch = new google.search.WebSearch();
>                       siteSearch.setSiteRestriction("lyponline.com");
>         searchControl.addSearcher(siteSearch);
>
>      // Set the Local Search center point
>      localSearch.setCenterPoint("New York, NY");
>
>      // Tell the searcher to draw itself and tell it where to attach
>      searchControl.draw(document.getElementById("searchcontrol"));
>
>      // Execute an inital search
>      searchControl.execute("lyponline");
>    }
>    google.setOnLoadCallback(OnLoad);
>
>    //]]>
>    </script>
>  </head>
>  <body>
>    <div id="searchcontrol">Loading...</div>
>  </body>
> </html>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to