Post Loading ads from Google Admanager

Posted by Prem on Stack Overflow See other posts from Stack Overflow or by Prem
Published on 2010-05-12T01:16:00Z Indexed on 2010/05/12 1:24 UTC
Read the original article Hit count: 264

Filed under:
|
|
|
|

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

© Stack Overflow or respective owner

Related posts about ad

Related posts about manager