Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Using placeholders for ad codes not working right

6:25 pm on Jul 13, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:May 31, 2002
posts: 157
votes: 0

Using the solution I found here: [webmasterworld.com...]

I am trying to set up my ad codes so that they are excecuted last using placeholders. Other solutions result in duplicate requests which I'm trying to avoid, but the code in the aforementioned thread does not work. The ads show, but they show at the bottom of the page without being removed to their proper places.

First I have the placeholder:

<div id="adbox"></div>


<div id="adboxloader" style="display:block;">{Lots of script text stuff here, unchanged from ad vendor}</div>
<script type="text/javascript">
var loader = document.getElementById('adboxloader');

This however never moves the ads, they simply load at the bottom of the page out of place. Any idea what might be going wrong here?
7:38 am on July 15, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 3, 2005
votes: 0

The ad vendor script may not have loaded the div by the time you move it.

For starters replace ad vendor script with static content and see if that works.

There are lots of tricks the ad vendor could be using, like waiting for onload, putting the script inside adbox may possibly be fastest loading option.
3:12 am on July 16, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:May 31, 2002
posts: 157
votes: 0

Just tried static and it worked, you're right it must be ad related.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members