IE bug + ScratchBack = Site didn’t load in Internet Explorer

April 6, 2008

For anyone who recently tried to view this site in Internet Explorer, my apologies for the following error message that you probably received:

Internet Explorer cannot open the Internet site.
Operation aborted.

This pop-up message occurred because the default ScratchBack JavaScript code that I used tries to modify the parent container from inside a child <div> container.  The original code given to me from ScratchBack looked like this:

<div id=”ScratchBackWidget”>
<script type=”text/javascript” src=”http://www.scratchback.com/widget.php?id=de957c64-c563-1e04-8581-e5ffa72cf5fa”></script>
</div>

This code works fine on Firefox and Apple’s Safari browser.  Unfortunately, due to a bug within Microsoft Internet Explorer browsers (5.5 – 7), the error message gets displayed, preventing the page from loading.  For anyone else experiencing the same issues, I hacked the ScratchBack code to the following (obviously it will be slightly different for your widget ID):

<div id=”ScratchBackWidget”>
</div>
<script type=”text/javascript” src=”http://www.scratchback.com/widget.php?id=de957c64-c563-1e04-8581-e5ffa72cf5fa”></script>

This corrects the problem in IE, and there doesn’t seem to be any discernible difference in viewing the page in Firefox or Safari.  The widget works as it should.

Special thanks to my brother Mike for noticing this issue, since it probably would have lasted for months had he not brought it to my attention (indeed, it had already been broken for a few weeks).

This taught me a valuable lesson to check my site with Internet Explorer whenever I make a code change.  Get with the times, folks, and please switch to Firefox already.

blog comments powered by Disqus

Previous post:

Next post: