As a followup to my entry about
id="tags" causing problems in IE/Win, here are
four five test pages for IE/Win:
- IE Keyword Testing (length)
- IE Keyword Testing (item)
- IE Keyword Testing (namedItem)
- IE Keyword Testing (tags)
- IE Keyword Testing (urns)
These are based on Kevin Hamilton’s observation that it’s highly likely the problems are caused by the
tags method in IE/Win’s
document.all DOM interface. As he says:
[I]f you have an element with an id=”tags”, then document.all.tags is now a reference to that element, and no longer a method of the document.all object.
Such states would completely shatter any IE DOM scripting that relied on the
document.all methods, and at least in the case of
tags causes problems like crashing on print (probably because of the aforementioned conflict between the ID value and the DOM method). The other keywords of concern are chronicled in the test pages listed above. I’d test IE/Win myself, except I don’t have a printer handy for IE/Win to use, and besides, bug-hunting is best conducted in large groups.
Basically, load up each test page in IE/Win and do anything you can think to do. Try to print, view source, save a local copy, et cetera, et cetera—the more obscure and offbeat, the better. Let us know via the comments any problems you run into with said pages (trying to print them is a good first step, since that’s what messed up on
tags) and I’ll add notes to each page based on what’s found.
In the meantime, I’m personally going to avoid using any of those words as ID values, and heartily recommend the same to you.
Update: I’ve added a test (for
length) to the above list, and have another that’s not on the list due to its unfinished nature. It’s a test of
For those in search of more background, or trying to find new ways to test possible conflicts, or whatever, feel free to look over Microsoft’s documentation of the “all Collection”.