Forum Moderators: open
can this be done?
if the page is "high" enough (x number pixels), i will put another vertical banner in... if it aint, i wont
simple? =)
woudl anyone be so kind to ask adsense if its allowed i dont see why
ok how would the code that i if look like?
<SCRIPT LANGUAGE=javascript>
<!--
YSizePixels = document.body.clientHeight;
XSizePixels = document.body.clientWidth;
//-->
</SCRIPT>
I think the above does what you want on the client end.
Some references:
[msdn.microsoft.com...]
[developer.mozilla.org...]
Look for the "document" and "body" elements.
Does removing the script declarations count? There are other legitimate sites doing more, so I don't know.
I'm simply amazed Google hasn't wrapped a CRC around the code to make it easy to detect any alteration at all.
If you try to put the Adsense code in an IFrame it won't work anymore, (it used too!). I don't think hiding the ads would be a good idea at all. That would break the TOS.
1) You should probably find a JavaScript tutorial somewhere. It is impossible to know exactly what the code would look like without looking at your page and your code. And, we do not allow personal URLs or "do my homework" type posts [WebmasterWorld.com]. So, if you want someone to do it for you, and do not want to take the time to learn a tad about JavaScript, the best option is to take a trip to the Commercial Exchange [webmasterworld.com] forum where you can be sure to find some assistance.
2) Questions about whether this is allowed or not are probably best answered in the AdSense [webmasterworld.com] forum.
:)
As already mentioned by several in this thread, the way this can be accomplished is by using
document.body.scrollHeight. Put something like this in the <head> of your document:
<script type="text/javascript">
window.onload = function() {
if(document.body.scrollHeight > ####) {
document.getElementById('ad2').innerHTML = "****";
}
</script>
#### is the height, as determined by you
**** is the code for the second banner
And, at the bottom of your page (or, whever you would like the second ad to appear), add this div:
<div id="ad2"></div>
lol yeh rite and pay you money heheheh