I am trying to incorporate my own advertisement module for my website, if their are no ads to be displayed it defaults to google adesense ad
I currently have
if(this.ad_found)
//run code to display ad
else {
google_ad_client = "ca-pub-";
/* Name */
google_ad_slot = "-----";
google_ad_width = ---;
google_ad_height = ---;
var head = document.getElementById('id_from_display_page')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = '//pagead2.googlesyndication.com/pagead/show_ads.js';
$("#id_from_display_page").html(script);
}
as you can tell I have no idea how to populate id 'id_from_display_page' to display the google adsense stuff
The display page:
<div id="id_from_display_page"></div>
I want to populate this div with google adsense