The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Thursday, June 30, 2005

I then remembered … I hate Internet Explorer

Six months ago I whipped up a Flickr-in-CSS proof of concept page. Since then, Flickr has actually converted to using CSS and JavaScript where before they were using Flash and doing an incredible job. But when I saw Dan Lyke doing a variation on it, I decided to upgrade the “proof-of-concept.”

So, between answering support tickets and attempting to install Linux on a Cobalt RaQ4 (don't ask—it's not pretty) I sat there hacking away at improving the page.

Unfortunately, if you are using IE, don't bother checking it. I gave up after spending way too much time trying to support both Mozilla (which supports the latest standard for JavaScript ECMAScript) and IE (which is in a different ballpark altogether).

What I didn't want to do is:

if (document.getElementById)
{
  popUpWinStyles = document.getElementById(id).style;
}
else
{
  popUpWinStyles = eval('document.' + id);
}

everywhere (basically, if you support the standard document.getElementById() function, use it, otherwise use the Microsoft way. That adds just tons of if statements all over the code and tends to make debugging rather difficult.

I thought that maybe doing:

if (document.all) // are we Microsoft?
{
  document.getElementById = function(id)
	{
	  var obj = eval('document.' + id);
	  return(obj);
	};
}

would work.

And it would have too, had it not been for those meddling programmers!

I mean, it worked as far as adding the getElementById() method to the document object if it's Microsoft, but what I forgot was that in the standard, to set the color of an element is:

obj.style.color = 'blue';

whereas under Microsoft it's:

obj.color = 'blue';

The standard has all the CSS attributes under obj.style where as Microsoft just sticks them under obj—one layer up, as it were.

Grrrr.

But then … even adding all the if statments (which I wanted to avoid in the first place) was problematic as IE's support of CSS is … maddening.

So, I decided it was easier to just forget about IE for this.

It's not like I use it.

Obligatory Picture

[It's the most wonderful time of the year!]

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: http://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

http://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2019 by Sean Conner. All Rights Reserved.