If I'm understanding you correctly, you want to use the same searcher
to search two different sites (even though your code is only set up
for amazon.com). Although you used to be able to do this with the
site: search operator, the functionality seems to have been disabled.
The only other option that I know of would be to set up a custom
search engine that would search only amazon.com and ebay.com . You can
then pull results from your CSE using the AJAX Search API simply by
providing the CSE id to the setSiteRestriction method.

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

For more information or a project quote:
[email protected]

On Aug 21, 6:05 am, greenhorn <[email protected]> wrote:
> Google search API
> ==============
>
> I need to use restricted search for coupleof web sites
>
> let say i need to get search bothwww.amazon.com andwww.ebay.com& i
> need to dispay it under " books " result coustom label
>
> " siteSearch.setSiteRestriction("www.amazon.com");" ?  how do i add
> search for above both sites ?
>
> I couldnt find way to search both sites. I was able to set search one
> web site ("www.amazon.com") as shown in below custormized sample.
>
> Please Help ...!!
>
> Does anone had clear API documention of Google search api ????/
>
> ==========================================================
>  <script language="Javascript" type="text/javascript">
>  //<![CDATA[
>         google.load("search", "1");
>         function OnLoad() {
>             var siteSearch = new google.search.WebSearch();
>             siteSearch.setUserDefinedLabel("books");
>             siteSearch.setUserDefinedClassSuffix("siteSearch");
>             siteSearch.setSiteRestriction("www.amazon.com");
>
>             // Create a search control
>             var searchControl = new google.search.SearchControl();
>
>             searchControl.addSearcher(siteSearch);
>
>         }
>         google.setOnLoadCallback(OnLoad);
>         //]]>
>     </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