Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,089 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
CSS Help: Move Div after page loads? #228112
09/17/08 19:05
09/17/08 19:05
Joined: Aug 2002
Posts: 2,692
California, USA
bupaje Offline OP
Expert
bupaje  Offline OP
Expert

Joined: Aug 2002
Posts: 2,692
California, USA
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.


Find me at: |Stormvisions| Twitter|
Re: CSS Help: Move Div after page loads? [Re: bupaje] #228115
09/17/08 19:11
09/17/08 19:11
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
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.

Re: CSS Help: Move Div after page loads? [Re: broozar] #228128
09/17/08 20:04
09/17/08 20:04
Joined: Aug 2002
Posts: 2,692
California, USA
bupaje Offline OP
Expert
bupaje  Offline OP
Expert

Joined: Aug 2002
Posts: 2,692
California, USA
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


Find me at: |Stormvisions| Twitter|
Re: CSS Help: Move Div after page loads? [Re: bupaje] #228502
09/19/08 22:25
09/19/08 22:25
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
I have no experience with AdSense, but isn't it possible to call the js function by onLoad? (after the page got loaded)

Re: CSS Help: Move Div after page loads? [Re: Scorpion] #228577
09/20/08 18:06
09/20/08 18:06
Joined: Aug 2002
Posts: 2,692
California, USA
bupaje Offline OP
Expert
bupaje  Offline OP
Expert

Joined: Aug 2002
Posts: 2,692
California, USA
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


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1