Hey, So I have an Ajax-powered website I currently display AdSense using iframes. I don't want to use iframes, is there a way around it? If I just copy/paste the code then it doesn't show anything at all. Need to work around it, so that the AdSense code would be IN THE PAGE itself and not in an iframe. Can anyone help? Will pay quick $2 via paypal.
Putting <div> code here </div> didn't help, still doesn't display anything And this code also doesn't help as it assumes that the ads are in a .php doc, I need the code to be on the page <script type="text/javascript"> var http = false; if(navigator.appName == "Microsoft Internet Explorer") { http = new ActiveXObject("Microsoft.XMLHTTP"); } else { http = new XMLHttpRequest(); } function validate() { http.abort(); http.open("GET", "ads.php", true); http.onreadystatechange=function() { if(http.readyState == 4) { document.getElementById('foo').innerHTML = http.responseText; } } http.send(null); } </script> <body Onload=validate()"> <div id="foo">ad will get display here</div>
dont mind to share your page where you want to show the ads!! Because you need to assign div location inside your CSS! else its like hidden! somewhere at the end of page!!
http://gotgame.lv/#/gallery/image/3984 Let's say this page I just placed a code like <div id="ads"> adsense code </div> under the picture, doesn't show up.
there is div named <div class="menuBody"> <div class="tac"><img alt="morning" src="http://gotgame.lv/image.out?path=/gallery/large//3984"/> </div> <br> Add your code here so it will shows up below 1st picture!! </div> Edit these chages from contents are being fetched via ajax!!! i.e http://gotgame.lv//misc/site.js i guess this page!! http://gotgame.lv/ajax.php
Dont embed the adsense until page is loaded... so that adsense can "read" the content of your page... if it doesn't exist on the page yet, adsense can't figure out what ads to show up and won't show them!