Hello, There are no ads in the SearchControl at this time, only the CustomSearchControl.
If you're getting the "loading" message, please provide a link to your code so we can take a look and try to troubleshoot. Thanks, Adam On Jul 2, 11:31 am, pfeds <[email protected]> wrote: > Did you have any luck with this? Whatever I do I can't get the ads to > display using the SearchControl. > > If I use the CustomSearchControl I have ads displayed but no results, > getting "This Custom Search Engine is loading. Try again in a few > seconds." instead. > > On May 28, 5:49 pm, michaeltk <[email protected]> wrote: > > > > > Regardless of what search terms I use, .enableAds is not working with > > the following code. The search is working just fine, but no ads > > appear. (Obviously, I insert my correct publisher id below). > > > <script language="Javascript" type="text/javascript">//<![CDATA[ > > google.load('search', '1.0'); > > > function OnLoad() { > > > // create the search control > > var searchControl = new google.search.CustomSearchControl({'crefUrl' : > > 'http://www.mywebsite.com/cref_cse.xml'}); > > > // enable AdSense > > searchControl.enableAds('pub-xxxxxxxxxxx'); > > > // tell the searcher to draw itself and tell it where to attach > > searchControl.draw('google-results'); > > > // execute an inital search > > searchControl.execute("buy books"); > > > } > > > 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.
