I have an adsense account and i want to put a google custom searchbox in my 
web page with my adsense ads.I want to show adsense ads when user make 
searching something by our google searchbox but i can show search result 
but i cant show adsense ads. My codes that:

My example page url: http://medyalog.com/test.php




    function gcseCallback() {
      if (document.readyState != 'complete')
        return google.setOnLoadCallback(gcseCallback, true);
      google.search.cse.element.render(
      {
            gname:'gsearch', 
            div:'results', 
            tag:'searchresults-only', 

            attributes:{
                 linkTarget:' _blank'

                 }});
      var element = google.search.cse.element.getElement('gsearch');
      element.execute('koton');
    };
    window.__gcse = {
      parsetags: 'explicit',
      callback: gcseCallback
    };
    (function() {
      var cx = 'partner-pub-7424019805974116:9648935074';
      var gcse = document.createElement('script');
      gcse.type = 'text/javascript';
      gcse.async = true;
      gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(gcse, s);
    })();
    </script>
    <div id="results"></div>    


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/10dc54a9-4214-42f9-a9d2-dd18b757babd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to