Post Loading ads from Google Admanager
- by Prem
I have changed code around to basically load an add the bottom of the page in a hidden div and attached an onload event handler that called document.getElementById(xxx).appendChild() to take the hidden ad and move it into the right spot in my page. This works GREAT.. however when the ad is a text ad it AFTER i move the ad there is nothing in the rendered Iframe. I did tests to see what it looks like before i move it and sure enough the text links load in the IFRAME but the second i do the appendChild call to move the div that contains the ad i seem to loose the contents of the Iframe.
Any ideas whats going on
<div id="myad" style="display: none;">
GA_googleFillSlot("MyADSlotName");
</div>
<script>
window.onload = function() {
// leader board
document.getElementById('adplaceholder').appendChild(document.getElementById('myAd'));
document.getElementById('myAd').style.display = '';
</script