Forum:Banner ad is stopping pages load

Something - and I strongly suspect it is a banner ad - is stopping pages from loading properly. I'm gettting an error message in a dialogue box and then the page blanks out (like a 404 error).

This was originally happening on my Spelljammer Wiki homepage. I logged in (which makes the ads go away) and the problem went away.

I came over here to request help and I see the ads at the top of this forum. I had the same problem here.

In fact it has taken me over 15 attmpts to be able to post this topic before the item crashing my browser kicked in.

Can an admin please check the recent adverts to see if any of them include some sort of hacker code. (I used to have a website back at Bravenet and their adds were often infected with nasty code that tried to install things, like Bonsai Buddy.)

If the problem does turn out to be an advertiser, please try to get them banned. David Shepheard 17:56, 3 July 2008 (UTC)

The problem is caused by an outside script (such as javascript loaded from an external website) modifying the HTML document before the document is loaded.

This problem only happens in IE due to how the page rendering works.

I had a similar issue to deal with and the solution is as simple as adding defer="defer" to the tag. --Bsodergren 16:46, 6 July 2008 (UTC)

additional info
These errors are produced in IE when the javascript tries to change the page before it has completed rendering. There are 3 common ways to solve this problem:

1) move all the javascript to the of the document and call a myFunction which initializes the page in the onload handler (in the tag, ). The onload handler is executed after the page finishes loading.

2) put all the javascript at the end of the (just before the tag) see this message.

3) a variation of #1, use a setTimeout to delay the output of the page until it has finished processing the ad script.

Bargeld 18:21, 6 July 2008 (UTC)