Friday, July 02, 2004

CCMS Web Site

There was a complaint that the CCMS site was doing some weird stuff with the design (randomly choosing the text version over the graphical version). I was unable to reproduce the problem even under the same platform/browser combination. After pouring over the code I think the problem was the manner in which I was attaching events to the document when it loads. Initially there was a both an html attribute (for the init function) and javascript statement (for the stylesheet switcher). I think the two were having problems cohabitating in some browsers because the javascript statement used "onload=" rather than a less destructive "addeventlistener" function. I've modified the code so that the function call that was originally in the html attribute is now part of the javascript statement.