Tuesday, September 6th, 2005

IE is teh 3v1l

Category: Editorial

Some people love IE, some… well not to much.

Jamis Buck (Rails committer) ran into one of those “pull your hair out problems” which caused him to write IE is teh 3v1l.

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.

Posted by Dion Almaer at 12:58 am
Comment here

+++--
3.3 rating from 6 votes

Comments Here »

Comments feed

Leave a comment

You must be logged in to post a comment.