The easiest and best way to do this would be to ditch the CSEOverlay  
for the google.search.SearchControl.  You can find documentation and  
examples at the links below:

http://code.google.com/apis/ajaxsearch/documentation
http://code.google.com/apis/ajaxsearch/documentation/reference.html

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 Jan 10, 2009, at 11:58 AM, [email protected] wrote:

>
> Hi guys
>
> I'm after some help trying to set up my “google site search” for my
> website. I am using the following code to make use of the API which
> works fine:
>
> function OnLoad() {
>  new CSEOverlay("005225586522549267618:bc6jsjymafe",
>                 document.getElementById("site_search"),
>                 document.getElementById("results"));
> }
> google.setOnLoadCallback(OnLoad);
>
> This code is provided by Google.
>
> However: I don't want to use an overlay I simply want to specify the
> site search (site_search) and the results (results) so that it can
> just target a div on my page and I dont have to work about all the
> over lay stuff. Its just overkill.
>
> I cant get it to work for the life in me. Ive read all the
> documentation, but surely I must be missing something. I'm pulling my
> hair out, and really don't want to resolve to using the iframe method.
>
> If anyone could help It would be hugely appreciated.
>
> I'm sure I need to go down this route:
>
>      function OnLoad() {
>
>        // create a search control
>        var searchControl = new google.search.SearchControl();
>
>        // create a draw options object so that we
>        // can position the search form root
>        var options = new google.search.DrawOptions();
>        options.setSearchFormRoot(document.getElementById
> ("site_search"));
>
>        // populate with searchers
> // pull my own search results in here somehow
>
>        searchControl.draw(document.getElementById("results"),
> options);
>        searchControl.execute("Test");
>      }
>      google.setOnLoadCallback(OnLoad, true);
>    //]]>
>    </script>
>
> >


--~--~---------~--~----~------------~-------~--~----~
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