
I know that to a lot of people the sort of Firefox/general open source community seems like a terrifying place full of anti-corporate zealots with smelly beards, but in the end there's a very good reason for its existence. Today at work I spent four hours researching, experimenting and working around Internet Explorer bugs, on a new part of our system to allow people to select the members of teams that would vote on changes to a document. And as everyone who doesn't use it is making one six-billionth of my life easier, I thought I'd guilt trip people into converting over in case there's anyone reading this that still uses the abomination. This is an entirely selfish thing - I'm ignoring the way that virtually every other browser is at least marginally faster than IE, free to download and more customizable (and in Firefox's case, leaks memory like a colander, but that's not as much of a disadvantage as you might think) because everyone's been told that already, and just concentrating on the advantage to me. And I'm not sure of the average technical Internet knowledge of my friends list, but I'll try not to talk down to anyone, provided that they haven't scrolled well away from this post by now. The idea of the new form was simple (or so I thought). Our property-editing summary page gives you lists of the current people assigned to each team. From there, you can click "Edit team" to pop a window open where you can transfer more people into the team or take others out, then click "Submit", whereupon it'll close again, transferring the new contents of the "Selected" box into the original one. Dead easy (or it would be if most of Javascript didn't look like $A().$('${sel2}'); ).But my problem (from Internet Explorer's point of view) was that I was using a rather handy way of telling web forms what to do called DOM, or Document Object Model. This lets you treat each part of a web page like individual objects, adding, deleting and editing them as you need. And for the most part, Microsoft is fine with you doing that, but on some computers (it doesn't even have the decency to be a consistent problem) you won't be able to move things between objects on different windows, and you'll get an error message saying "No such interface supported", which is naturally about as helpful as a water pistol in the Towering Inferno. The way to fix this is apparently to re-register a couple of DLLs that may or may not be installed incorrectly, but you can hardly ask people to do that if they're the type that struggle with copy and pasting. Instead, I learned that Microsoft knew about their slight shortcomings in the field of sensible ways to handle webpages and had introduced a hackish fix - a made-up "innerHTML" property of each object on the page that you can use to directly edit the <option value="it hurts">My old man's a dustman<option> -type tags that you'll see if you go to View/Page Source up on your menu bar. So the solution was obviously (though slightly inconveniently) to write the bits that needed to be transferred into the page manually and stick them in like that.Except... not only do they have a workaround to do something that everyone else has managed, they didn't get the workaround right either. Somewhere, it contains a bug that means that items in a select box may or may not be written correctly, and this rendered it pretty much useless for my purposes. In the end I resorted to detecting if someone was using IE, then building an array of arrays of strings that could hold everything I needed on the page, passing the whole thing under the table to the parent page through Javascript where IE couldn't mess it up and then cobbling together some items there from the collected data. Meanwhile, everything else can happily do it in about a hundred fewer lines. Of course, the really frustrating thing is that our clients will never see this. Neither do most people who use IE and can't understand what everyone's complaining about. But it's the scourge of web developers everywhere for the reasons I've outlined above and more. So can you not do me a favour and download something else instead anyway? It'll take a minute of your time and I think you'll find it's rather better for other reasons, too. I don't even much care what you switch to - just as long as you realize that there's no reason on Earth to use IE7 unless you are actually being forced at gunpoint. Remember, like I said before you stopped reading this - everyone that switches over is making my existence just a tiny bit less stressful. There, that should do it. 2008-04-11 22:20:00 7 comments |