Weird bug in Internet Explorer with the ARBO ad codes

This morning I came across a VERY strange IE bug on one of my websites that we have to launch tomorrow – a certain page would not work in IE5, IE6, IE7 under Windows XP SP1, SP2, while it worked fine in Firefox, Opera or Mozilla.

The message shown is: Internet Explorer cannot open the Internet site [url…] Operation aborted !!!

Apparently interacting with innerHTML and possibly using other JScript functionality causes IE to pop up “Internet Explorer cannot open the Internet site. This bug appears when you try to put some html inside a DIV tag using innerHTML and solved the problem by puting the DIV inside a TABLE. Sample code for “Operation aborted”
This sample code will give you the “Operation aborted” error in IE6, while it works as expected in Firefox:

So, the bug appeared on the website when we put the ARBO codes. As you know, the ARBO codes come with two parts. It seemed that the second part caused the bug when was placed just below the last code in a table.

ARBO says:

<-- HowTo: It is good idea to place this code just below the last ad code. -->

and I would ad:

<-- HowTo: It is not a good idea to place this code just below the last ad code if the ad is in a table and if your users use Internet Explorer -->

The solution: because the site used a template, we took the second part of the code and put it in the footer file… far, far below the last ad code and it seems that and out of any table. So if this would happen to you, blame Microsoft and put the codes outside any table.

Via Channel9 MSDN Wiki:

It seems that this problem is caused by the fact that the SCRIPT block operating on innerHTML or DOM structures is located inside a TABLE tag. I moved the SCRIPT tags outside the TABLE tag, and viola – that fixed the problem. Peter Janes pointed out in the comments that the issue is deeper than that, it seems to be related to the timing issues with DOM rendering. I am going to leave it for now unless I see other problems, but using setTimeout or some other way of doing things is not out of the question.

More about the IE bug issue on Peter Janes.

One Reply to “Weird bug in Internet Explorer with the ARBO ad codes”

Comments are closed.