Friday 13th

This page contains a bug report related to Internet Explorer 6 for Windows. And there is a workaround. Although some other browsers also expose a bug, the workaround does not apply to those browsers because it doesn't work. The purpose of the script is to calculate the next 100 times Friday the 13th occurs in a month. This is displayed on the bottom of the page in another color.

Explorer Windows

When using JavaScript and W3C DOM2 methods to create a table with table rows, table data cells and text nodes and append it to the document tree, WinIE 6 does not display the table at all. I found out of this when creating a web page. I also tested it in Mozilla 1.7.8 for Windows and Mozilla 1.7.11 for Mac OS X and Opera 8 for Windows and Opera 8 for Mac OS X and it worked fine.

There is a workaround for this: Instead of inserting table rows into a table, create a TBODY element and insert table rows into this TBODY element and insert it into the table. On this page I have placed some comments in the script describing how to implement this workaround. Such comments are marked with +++. Please see the document source for more information. I have another page which implements this workaround and it has some more comments in the script source:
heima.olivant.fo/~gunnarv/fri13en.html

Explorer Mac

In Internet Explorer 5.2.3 for Mac OS X the script does not work at all regardless of whether I provide the workaround or not. It is not clear whether the bug is caused by inserting table rows in a table or performing a heavy amount of date arithmetic.

Safari

If you display this page in Safari, some conditional code prevents the example from running, because Safari crashes when working with dates in the future. This has something to do with the setFullYear() or getDay() methods of instances of the Date Object. Maybe this deserves a bug report of its own. But I have not isolated the bug.

Origin

At first I did not know what to do with the WinIE bug, so I searched on Google and found a thread in a discussion forum providing the workaround. It is located at:
www.codingforums.com/archive/index.php/t-17321.html
I owe them thanks.

Contact

You are welcome to write to me at gunnarv@post.olivant.fo. I use the aforementioned address on MSN Messenger. And on AOL Instant Messenger (AIM) I am called LeopSky. My ICQ number is 306276225.

This is the last paragraph with static HTML. Below is dynamic content in another color inserted with a script.