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.