Unfortunately, I don't know that you can access the default searcher in the Custom Search Control. At least, not in a reliable way. The code is compiled, and the obfuscation scheme will change periodically as they push updates.
Jeremy R. Geerdes Effective website design & development Des Moines, IA For more information or a project quote: http://jgeerdes.home.mchsi.com [email protected] If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church! On Mar 3, 2010, at 10:19 AM, MrM wrote: > Hi, > > What is the proper way to access the default searcher, created by > google.search.CustomSearchControl, so I can add a restriction to the > search results? > > Through inspection, I have found that the following method works as > intended: > var cse = new google.search.CustomSearchControl(api_code); > cse.hb.setRestriction(google.search.Search.RESTRICT_EXTENDED_ARGS, > { lr: 'lang_' + lang }); > > However, I suspect that using a variable name like "hb" is not the > proper way, and the name is subject to change when a new version of > the search control comes out. > > -- > 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. > -- 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.
