Hi,
Do you have html like this
<form id="form1">
<div id="searchform">Loading...</div>
</form>
then the
document.getElementById("searchform")
will work.
Regards.
On Sep 25, 8:42 am, gbarzo <[email protected]> wrote:
> hi,
> my own google.search.WebSearch with SiteRestriction return no result,
> but if Isearchon google the same word withsite:mydomain, it
> works...
>
> here my code:
>
> <script src="http://www.google.com/jsapi?key=ABQIAAAA-
> eW3MhVmBFPhtIKQYEkZfRQnwfp6McsCEraaluHe19Yw3tTmxxQjhlu1-
> SyFmVjc44Y8jZRdpZirBg" type="text/javascript"></script>
>
> google.load("search", "1");
>
> function OnLoad() {
> var searchControl = new google.search.SearchControl();
>
> var siteSearch = new google.search.WebSearch();
> siteSearch.setSiteRestriction("topten-challenge.com");
>
> var options = new google.search.SearcherOptions();
> options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
>
> searchControl.addSearcher(siteSearch, options);
> searchControl.draw(document.getElementById("searchform"));
> searchControl.execute(defaultSearch);}
>
> google.setOnLoadCallback(OnLoad);
>
> any help??
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---