... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2004-07-28

DOM/CSS

I played around with DOM and CSS some more, trying to get the calendar from yesterday to embed well.  I had discovered that the CSS that I was using to format the calendar could be easily overridden by CSS that applies to containing elements, causing the calendar to look bad in those circumstances.  For example, I had rules with selectors such as "table.calendar td".  Unfortunately, when I tried to embed the calendar in a containing document that used selectors such as "div.container td", the latter's rules would override the former's whenever the calendar nested within the container's selected elements.  In CSS 2, one can write much more picky selectors, such as "table.calendar > tbody > td" which are very specific.  Alas, CSS 2 is neither widespread, nor well implemented.  So, I rewrote the calendar HTML and CSS so that every calendar element that needed styling would have an unambiguous ID or class.  As an example of an embedding document, see 2004-08.html.

2004-07-27

DOM

I tried to create an HTML page that used ECMAScript to generate a calendar.  First, I used document.write() to create it -- that worked in IE, Mozilla, and Firebird.  Then, I tried to use DOM methods.  This is much nastier.  First, I discovered that IE will not display a table that is created using raw createElement() calls for TR, TD, and TH elements.  The debugger reveals that the correct object model has been created, but IE just refuses to display it.  I then switched to use the insertRow() and insertCell() methods on the various table objects.  This mostly worked in the browsers, but:

  • Moz/FB put all rows into the THEAD instead of just the header rows.
  • None of the browsers created TH elements in the THEAD section -- they all used TDs.
  • IE insisted upon wrapping the text contained in the header at the first space -- whether it needed to wrap or not.

After much fidgeting, I just could not get the bugs to disappear.  I guess that it is best to use good old document.write()... but that means that one needs to do HTML escaping.

Update: I found a workable compromise.  First, I didn't bother with the THEAD element at all since Moz got it wrong.  Second, I used createElement("th") to create the header cells.  IE doesn't seem to choke on that.  The result is in calendar.html.

2004-07-13

Network

We had lots of inexplicable performance problems with the network today, starting right in the morning.  The problems appeared to be confined to the switch in the tech office.  We tried swapping switches and cables, with no effect.  I rebooted the main switch in the computer closet.  That appeared to fix the problems.

TortoiseSVN

I also noticed some zero page, zero byte print jobs were being reported for my user id whenever I tried to browse a network drive. It turns out that TortoiseSVN scans all shares for .SVN files -- including printers!  Apparently, this causes these bogus print jobs to appear.

Blog Archive