CSS Help: Move Div after page loads?

Posted By: bupaje

CSS Help: Move Div after page loads? - 09/17/08 19:05

I have some Adsense code from Google on my site http://www.stormvisions.com to serve ads. If you have a Hosts file or other ad busting software the page hangs at the point where the code is for a few minutes (until it times out I guess) then loads the rest of the page. The delay is unacceptably long.

The solution seems to be to create empty div's for the code, load the code at the end (just before the closing body tag) and then move the code that calls the showads.js file into the empty divs when the page has finished loading. I've been picking at this for the past two weeks but haven't figured it out. If anyone has an easy solution please let me know. I tried loading them in place not visible and then set them to visible but there is still the pause so loading them after the page loads seems to be the way.

Thanks for any help.
Posted By: broozar

Re: CSS Help: Move Div after page loads? - 09/17/08 19:11

if you put the ads in a seperate page and include wit include() or as <iframe>, would that make any difference? at least as iframe, even if it's surely a lame trick, it should work.
Posted By: bupaje

Re: CSS Help: Move Div after page loads? - 09/17/08 20:04

hey broozar. my understanding is that iframes are not allowed - in part because targeted ads are served after parsing and analyzing the enclosing page to determine the subject matter. The php include() would be run before the page was served to the browser, then the javascript so it wouldn't help. You are not allowed to mess with the actual javascript code either or you get banned.

Thanks for the ideas though. smile
Posted By: Scorpion

Re: CSS Help: Move Div after page loads? - 09/19/08 22:25

I have no experience with AdSense, but isn't it possible to call the js function by onLoad? (after the page got loaded)
Posted By: bupaje

Re: CSS Help: Move Div after page loads? - 09/20/08 18:06

It might be, would still have to position the ad I think. I'll just try to make some time and sort it out - one more subject I have to learn about. smile
© 2024 lite-C Forums