Say you have a bit of code that looks like this:
<script language="javascript" type="text/javascript">
<!--
function goodBrowserCheck(FormID) {
alert(document.getElementById(FormID).name);
}
//-->
</script>
and your HTML looks like this:
<form name="testform" id="testform" method="post" action="menu.php">
<a href="javascript:goodBrowserCheck('testform')">Link Here</a>
</form>
Simple stuff. You should get an alert reading "testform". And in both Mozilla and IE, you do. No surprises there. But what if we change our form tag to look like this instead:
<form name="testform" method="post" action="menu.php">
<a href="javascript:goodBrowserCheck('testform')">Link Here</a>
</form>
In Moz, we get a nice error on our console: "Error: document.getElementById(FormID) has no properties"
However, what do we get in IE 5.5 and 6.0? An alert reading "testform".
IE's implementation of getElementById is severely flawed; flawed so much, in fact, that it blatantly ignores the very name of the function you are using! Get an Element By it's ID! No ID exists in that second example, and yet, IE returns a value. When it can't find the ID you're looking for on an element, it grabs any element that has a name attribute matching the ID you're looking for. This is not documented anywhere (as far as I can tell), and I probably lost about an hour of my time figuring out why IE worked on a much more complex script, whereas Moz failed. Moz was actually doing the correct thing by failing.
Let's take this a step further, shall we? Say we modify our HTML to look like this:
<form name="testform" method="post" action="menu.php">
<input type="hidden" name="test!" ID="testform">
<a href="javascript:goodBrowserCheck('testform')">Link Here</a>
</form>
In this case, we have an element with the name "testform", and another element with the ID of "testform". The expected result when getting the name attribute of an element with an ID of "testform" is to get the name value for the hidden field, which is "test!". That's what Mozilla gives us.
IE gives us "testform".
So, even worse, it ignores an element which does have the ID we are looking for, because another element with the same name is its parent.
We all knew that Moz was a better browser to begin with, and we certainly knew that it's Javascript Debugging was far superior to IE's, but this takes the cake in my opinion. If you're working with Javascript, you should be working with Mozilla, plain & simple.
She sat down on the carpet, legs crossed, searching through the VHS tapes stacked three-deep in the cabinet.
"No, that's not it. It's one of those old Kodak tapes he used to buy. I think it's in the wrong case. Ahh, here it is! Now where did that other one get to? Oh, right here!"
She hands me two tapes, both almost as old as I am. I flip them over so I can read their labels. The first one is a printout attached with packing tape, the second is written in his handwriting. They read "Palumbo Family Album", and "Tony's 20th Anniversary", respectively. I was five years old when they were both filmed.
She stands up, hugs me. "I know, I miss your father too." I can tell she's holding back a tear. I utter a sheepish thank you. The tear makes a run for her cheek.
The drive home is both too slow and too fast. It's been so long since I last saw my dad alive, I don't even remember what his voice sounded like. I don't remember his mannerisms, I barely recall his constant whistling. I need to remember. "You'll be ok", I tell myself over & over again in my head.
I walk inside, go to the living room, turn on the VCR and TV. A flip of a loose quarter decides which video I'll watch first. Anniversary tape it is. I put it in the VCR, turn the volume up, and grab the box of tissues out of the bathroom.
And I can't bring myself to push the Play button.
That was last night. I tried again tonight, with the same results. I guess I'm just not ready yet to feel that type of pain again. Maybe sometime soon, but not yet.
I never watch football. Sorry, I just don't. I've never found it a particularly interesting or exciting sport, and I probably never will. That said, the Philadelphia Eagles played the Carolina Panthers tonight (the Eagles lost, the Panthers are off to the Superbowl), and I happened to catch a bit of the game.
Normally this wouldn't be even remotely noteworthy. However, at one point, the station began playing James Taylor's "Carolina In My Mind" while showing a Panthers highlight reel. They finished the reel by saying the following statement:
"Nothing says hard-nosed January football like the music of James Taylor."
I almost snorted iced tea out of my nose.
Also, there was so amazing news footage of angry Eagles fans punching other Eagles fans in the parking lots outside of the stadium. Damn glad I don't live in South Philly right about now.
I feel strangely compelled to write, while memories are still fresh in my head. I haven't checked my email yet, or any other favorite corner of the internet. It's straight for the blog.
I fell asleep promptly last night at eight o'clock, in preparation for my long day. And it was quite a long day. I don't mean long in the "Sitting through an extended edition of The Two Towers" way. I don't mean long in a "taking the SATs for the first time" way. I mean long as in a "I think I'll just jump on a plane and fly to New Zealand" kind of way. My day was nineteen hours long.
The gentle sounds of Billy Corgan's guitar woke me from my sleep at three o'clock. I was sweating underneath my heavy down covers, and did not want to move from my bed. Upon finally turning the lights on and rising out of bed, I noticed that it was snowing, much to my surprise. I tend not to put my faith in meteorologists; they're often wrong in the "you couldn't hit the broad side of a barn" type of way.
A nice hot shower, a quick change of clothes, and I was out the door. The fresh powder slid off of my windshield with ease, and found a new home on my glasses.
Unlike a usual morning commute, today's was exceptional. The trifecta of very early morning, "bad" road conditions, and only needing to drive three point six miles had me downright giddy. I have never seen the highway so deserted, or so obscenely beautiful, shiny and calm in a serene moment of pre-dawn bliss. (Yes, I of course took pictures.)
Arriving at the gate of my destination, I buzzed for the almighty security gods to acknowledge my prescence. The camera placed just above the speaker came to life, whirring and clicking, a ring of pure white light illuminating my face in the dark. I'm sure the combination of wind chill on my cheeks and blinding light in my face made for quite a lovely portrait of myself.
I knew the way from my trip here seven months ago, and I proceeded up the ramp, passed the second of too-many-to-count cameras, to the elevators, to the security desk, to the twisting hallways, to the cafeteria, to the metal staircase, to the break room where my coworkers were scarfing down soda and left-over hoagies from the night before. None of them had slept since their arrival twelve hours prior.
We made our way to our work room, a twenty-five foot by twenty foot area stocked with computers, monitors, hubs, switches, bridges, keyboards, mice, KVM switches, routers, tape backup units and their matching tapes, coils of ethernet cables, flashing LEDs, and other such friendly sights. The view from the room was spectacular. To one side, a foosball table, and to the other, downtown Philadelphia, a sight which would reveal itself many hours later once the sun finally found the energy to stand up.
The day consisted of many parts which are currently blurring together and vanishing from my mind. The combination of frantic work and then agonizingly slow waiting will cause you to find ways to pass the time. So we read, ate snacks, watched movies, ate breakfast, greeted arriving coworkers, ate, played games, discussed office intricacies, ate lunch, discussed politics, read some more, ate some more, read over one hundred and sixty pages of a book I had the foresight of bringing with me, ate dinner. This only occupied the first thirteen hours of my day.
Were we allowed to bring cameras beyond the parking garage, I would have snapped some of the most beautiful things I have ever seen. The crowds running in the fresh snow, the parking attendents slipping and sliding on ice, the steam rising off of skyscrapers, the parking garages filling, small icicles breaking making a break for it from their prison cells, only to be caught in an updraft and spin around in front of my eyes, hundreds of feet in the air.
From my view high in the air over Philadelphia, tucked away from all but a half-dozen other people, I watched the city unfold. I saw the sun rise brilliantly and yawn gracefully. I looked out in amazement as the pillars of steel and concrete surrounding me put on a light show, their offices filling up and clearing out. Everyone below me was oblivious to my gaze, but it felt as though they were performing for me.
I thought about immortality. I thought about how nice of a ride those three miles were. I thought about how many bottles of Sprite and orange juice I had consumed. I thought about where the closest bathroom was located.
Reality said to her sister Stress, "watch this effort in futility, watch them grow antsy and tired, watch them long for an end for this day". Reality, to often being adored in the modern world, sometimes forgets that even she is fallible. For every minute I spent there, I wanted to spend two more. It seems Serendipity still knows how to pull a fast one on her sisters.
I can't quite explain why I was so charmed by the experience. I see this city every single day. And it's certainly not the biggest or brightest city I've ever laid my eyes on. But today, it just felt perfect. Everything was right. It didn't matter that I was tired or cold, nothing could make me upset. Not the stiffness in my joints, not the overpowering roar of the machinery, not even the seventeen hours spent spent in two rooms. Everything just fit.
Maybe this is how some people feel when they first look out over New York city. Maybe this how some people feel when they climb a mountain. Maybe this is what it feels like to be rich and powerful, to look down over your dominion. To me, it just feels like happiness.
And I don't think I'll ever fully understand why.
This is just something I happened to notice the other day. The US Postal Service has a series of stamps out for the 2003 holiday season called the "Music Maker" series. You can see them online at the US Postal Service Store.
Here is a close-up of the 4 stamps offered in the Music Maker series:

No big deal, right? Two reindeer, two Santas, and they are all playing instruments. But wait a minute, look again at that reindeer in the top left. Look familiar?

Well, I'm home sick today (the lymph nodes in my neck are considerably swollen, and my whole face hurts), so I decided to watch the Macworld Expo on my Powerbook. It was a nice way to spend some time in between naps & taking medicine.
Well, the Keynote by Steve Jobs has now come & gone, and it left us with some new products. The highlights are the iLife updates along with GarageBand, for $50! Wow, that is kick-ass. Also, the upgraded Xserves and Xserve RAID is pretty amazing, and very competitively priced. Steve's jab about Linux was also pretty funny ("Unlike linux, you can be a mere mortal and use this thing"). I personally don't think Linux is all that difficult with most things, especially with Redhat's GUI admin tools, but I think he has a point. OS X Server is pretty damn easy to use.
I feel overall let down by the Expo though. The new iPods are here, but the top of the line models weren't upgraded at all. The 10 GB model moved up to 15 GB, which makes the 20 GB model seem rather overpriced. Also, the iPod minis are here, but the pricing of them just doesn't make sense to me. I like the general concept of them, but I was hoping for a $100-$200 model. Pricing these things at $250 makes them only $50 away from the low-end iPod, so what's the point? I was hoping they would at least match the price of similar low-end players, or break them. I should have known better, Apple doesn't traditionally like to be a loss-leader.
And of course, no upgrades to the LCDs. I want a 23 inch Cinema Display, but I've never been a fan of the plastic, pinstripe look that was introduced with the older PowerMacs and Cubes. I was hoping for the rumors of a new Cinema Display enclosure, and bumping up the USB ports on them from 1.1 to 2.0, but alas, no such update. This leaves me in need of a monitor, and not knowing what to do. Do I wait? Do I just buy one now? I'm confused. I suppose I'll wait a few more months and see what happens.
In the mean time, I'm going to go order a 40 GB iPod.
Happy New Year, everyone! I hope everyone has the best new year possible.
Oh, and if you're curious about my new year's resolution...it's 1920x1200.