The maze book for programmers!
mazesforprogrammers.com

Algorithms, circle mazes, hex grids, masking, weaving, braiding, 3D and 4D grids, spheres, and more!

DRM-Free Ebook

The Buckblog

assorted ramblings by Jamis Buck

IE is teh 3v1l

3 June 2005 — 2-minute read

It’s been said before. I’m sure it will be said again. And again, and again.

IE is teh 3v1l.

You would be hard-pressed to find a browser as worthless in every way as IE. Want to know what happened today?

We were getting reports from users of Backpack that when they tried to print a page from IE 6 they got Javascript errors.

So, thinking it was some bonehead thing on my part I started digging in. I was able to readily duplicate the error on my Windows box, but (lovely IE!) the error message was singularly unhelpful. “Object doesn’t support this property or method”. The location it gave was useless, because it didn’t specify a file—only a line number and character offset. I then installed the MS script debugger, which simply dropped me into the middle of one of the DLL-generated scripts, and told me absolutely nothing about the root cause of the problem.

So, I dropped back to the tried-and-true JS debugging method—start ripping out code until it works, and then add the code back a bit at a time until it breaks again. After about a half-hour of narrowing the search, I found the culprit.

We have a text area named “tags”, which we use to allow users to edit the tags on their pages. Seems like a natural enough name, no?

However, IE didn’t like that name. Oh, it handled it fine most of the time, displaying it, editing it, etc. It handled it fine, right up until the time you tried to print, and then IE choked on it. Perhaps IE uses that name internally during printing or something. Who knows?

Changing the name to “edit_tags” (and fixing all the relevant functional tests and auxiliary scripts that referenced the field as “tags”) caused the error to go away.

Talk about bizarre. If I were Microsoft, I would be frankly embarrassed to own a product like IE.

Reader Comments

ie is like a huge mystery, I dont even think their developers know what their software do!
Thank you! For four hours I've been trying to find out why IE was refusing to Print Preview a page that Opera, FireFox and NS4 all found acceptable. The page validated, and so did the css. No javascript. I chopped out a few paragraphs because they contained something unique to the page, and the print Preview was OK. I put them back, editing out the unique bit. Print Preview refused the page. So I've been Googling since 5 o'clock. It's 8:15 now, but I think I may have the answer. My troublesome passage had a heading--Tags! I am SO grateful to you. I'd never've worked that one out for myself. Fay Johnston
I thought it was the *word* "tags", which worried me, because that was the subject of the passage. It wasn't quite that bad, though. I'd written

Tags

Having read your article and fiddled a bit, I changed it to

Tags

and print preview and all goes well. (Interestingly, if I went straight to Print on the troubled page, IE said I had two javascript errors. Difficult to manage without any javascript! )
Sorry. That looks pretty meaningless. Didn't consider html was turned on. The bit that caused trouble was <h3><a name="tags">Tags</a></h3> and the revised version is <h3><a name="maryanne">Tags</a></h3> Now I'll stop scribbling on your pages. Thanks again. Fay