When Printing Kills
Here’s a fascinating little tidbit: on some users’ machines, attempts to print out Joe Clark’s ALA article “Facts and Opinions About PDF Accessibility” would crash Internet Explorer. The error message mentioned a script error in line 1401: “Object doesn’t support this property or method”. Funny thing: we weren’t doing any scripting. The error was actually occurring shdoclc.dll/preview.dlg, which is of course a piece of the operating system.
Jason did some sleuthing and traced the crash to this line of markup:
<h2 id="tags">Tags and structure</h2>
Honestly, that was it. So Jeffrey renamed the ID to read:
<h2 id="structure">Tags and structure</h2>
So far as we know, no more crashing in Explorer.
Ain’t browsers a slice?
(And yes, we’re aware of the clamor for a print style sheet. More on this later.)
Update: Marten Veldthuis from Strongpsace points out that 37signals ran into a very similar problem in Backpack. Details can be found in Jamis Buck’s June 3rd post ie-is-teh-3v1l. Spread the word: “tags” is effectively a reserved keyword, even though no such concept exists in (X)HTML. Use it at your (users’) peril.
46 Responses»
Marten Veldthuis wrote in to say...
Wow, more problems with id=”tags”? 37Signals also had problems with it in Backpack, Jamis blogged it up a little while ago.
Received from miriland » Blog Archive » When Printing Kills…
[...] rinting Kills…”>
Having trouble printing a web page in IE? Perhaps might be the reason why. Talk about random.
This [...]
somuee wrote in to say...
ahhh… but did you spin clockwise or counterclockwise 3 times before you clucked like a chicken, hopped up and down on one leg and started typing?
Received from Geoffers'
Death by ID
Why Joe Clark’s ALA article “Facts and Opinions About PDF Accessibility” wouldn’t print in IE
…
Received from Geoffers’ » Death by ID
[...] Web Stuff – Saturday, August 27th 2005 As Eric Meyer posted this a couple of hours ago, and I find this funny, I’m going to post this [...]
Chris Hester wrote in to say...
Is this related to Microsoft’s abandoned plan to include Smart Tags based on the words in a web page?
Julian wrote in to say...
Hey, good tip, I think I have to change a site of mine…
Received from workingwith.me.uk blog
Printing website kills machine, news at eleven!
Turns out that Internet Explorer throws a big wobbly if you try to print a webpage which uses “tags” as an id. Who knew? I’d be quite interested to know how they went about sleuthing out that it was the tags id that was the problem, especially since…
Received from Gea-Suan Lin's BLOG
IE Bug
嗯,其實是 hlb 布丁長輩 在 irc 上渡化大眾:
21:51 <@hlb> gslin: 長輩知道讓 IE crash 的新方法嗎? id=”tags” :p
21:51 <@gslin> @_@
21:51 <@hlb> gslin: print preview 就爛掉 :p
21:51 <@gslin&g…
Received from Tobias Bergius Blogg
Utskrift om
Received from schestowitz.com
Firefox for Web Design
Many reasons (extensions) for using Firefox when designing for the Web
Ryan wrote in to say...
Unfortunately, I’m having a similar problem with Firefox on a site I’m working on, printing causes Firefox to lock up. I have to kill the process to use it again. Anybody know of any specific issues I should be aware of?
Kevin Hamilton wrote in to say...
Under Microsoft’s DHTML, I guess tags would be a reserved word.
Because they have that pesky document.all collection, which introduces the tags method, which is akin to document.getElementsByTagName. If you have an element with an id=”foo” then document.all.foo would be a reference to that element.
if 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.
It seems this is also true of the other document.all methods ( item, namedItem, and urns ). If you create a simple HTML page with a button whose onclick=”alert(document.all.item)”, clicking the button you will get something like:
function item(){
[native code]
}
If you add an element with id=”item” then run the test again, you will see [object].
I don’t know if all four of these keywords will have side-effects like breaking printing, but they certainly would break javascript in unexpected ways if that javascript tries to use micorsoft’s document.all object.
Eric Meyer wrote in to say...
Kevin– I wondered if it would have something to do with Microsoft’s
document.tags. Your point about the other keywords is one I hadn’t taken into consideration, though. Time to construct some test cases. Thanks!Received from 黑暗中的舞者 »
[...] 是他把上述代码更换成 Tags and structure 以后,IE又可以正常工作。所以Eric总结出,原来”tags”这段代码,可以让IE崩
Received from 黑暗中的舞者 » 可以让IE崩溃的HTML代码
[...] 是他把上述代码更换成 Tags and structure 以后,IE又可以正常工作。所以Eric总结出,原来”tags”这段代码,可以让IE崩
Jacques Marneweck wrote in to say...
Why does Microsoft keep making certain works reserved words. Does that MSSmartTagsPreventParsing set to “true” not fix that issue?
Received from Dextrose
Printing website kills IE
Even a simple CSS ID-tag can crash Microsoft Internet Explorer…
…
Oliver Zheng wrote in to say...
That is sad..
Received from Dextrose » Printing website kills IE
[...] rinting website kills IE Notes Even a simple CSS ID-tag can crash Microsoft Internet Explorer…. Update: [...]
Gabriel Castro wrote in to say...
I also ran into an IE CSS oddity when doing some JavaScript on my own site.
The comment live preview code I use relies on an
<input id="author" />tag. Seems like a reasonable choice for an ID, right? Well once I added a<meta name="author" />tag my JavaScript stopped working and I got the same “Object doesn”t support this property or method” message.From what I could gather, IE would return the meta tag to a getElementById call. Unfortunately, I haven’t had time to really research further into this problem. Maybe I should make some time…
Received from ID tags are bad
[...] e ever seen. Don’t ever put the words tags in your id attributes. Eg: id=”tags” Visit Site Comments are closed. [...]
Received from design.Principles » When Printing Kills
[...] he same error that I helped a colleague with some time back, but through different means. Check it out
Recent Posts
[...]
Received from el factor humano » Archivo » Otra de IE: Tags
[...] omentarios (0) Una breve nota de utilidad pública vía Eric Meyer: si no quieres que los usuarios de Internet Explorer sufran una caí [...]
Received from Browser und die Druckausgabe » Peruns Blog - Webwork und Internet
[...] text id=”tags”, dann bricht der IE den Druck genau bei dieser Zeile. Weitere Infos gibt es hier. Stichwörter: keine « Blogsysteme als Alternative| [...]
Received from 16-bits: Blog sobre Tecnolog
[...] ; al atributo id de un elemento, en algunas PCs Internet Explorer har
Received from Web4C » Blog Archive » IE Reserved ID?
[...] IE Reserved ID? IE
Received from CSS-Technik-News
[...] ken des Facts and Opinions About PDF Accessibility-A LIST Apart-Artikels von Joe Clark zum Absturz des Internet Explorers. Eric Meyer geh
Received from Minid.net » Blog Archive » Otro error de IE para la lista, ¡ouch!
[...]
Otro error de IE para la lista, ¡ouch!
S [...]
Received from Blog CAMYNA » Archivo del Blog » Otro error para Explorer
[...] ebe a que la palabra “tags” es una palabra exclusiva del navegador Internet Explorer. Otros sitios se hacen eco de lo mismo. La solución es muy sencilla, no uses E [...]
SugarKane wrote in to say...
I have seen this a few times before with other words used for id’s.
If only I had thought to keep a note of them …
tubor.de wrote in to say...
Marty Vance wrote in to say...
This is nearly identical to the Netscape 4.x bug that prevented form submission if the submit button had the attribute name=”submit” (not Submit, just submit).
Received from El blog del Señor Bohnke » Otro error en IE
[...] Pedrianes. « El iArm Otro error en IE Se ha confirmado que no se p [...]
Received from torresburriel.com » Lecturas sobre hojas de estilo y est
[...] ted Web browser standards support Interview with Dan Cederholm Writing Semantic Markup When Printing Kills Using the AIS Web Accessibility Toolbar Sony site in stan [...]
Received from revelation » Blog Archive » IE - Simply Laughable
[...] this wasn’t enough, Eric Meyer mentioned a very interesting phenomena a while back: some valid [X]HTML actually kills Internet Explorer. It’s not colloquial [...]
Received from Max Design - standards based web design, development and training » Blog Archive » Some links for light reading (12/9/05)
[...] ted Web browser standards support Interview with Dan Cederholm Writing Semantic Markup When Printing Kills Using the AIS Web Accessibility Toolbar Sony site in stan [...]
Received from rh3toric
Crashing IE6
While testing sites I rarely have taken the opportunity to test printing on all browsers/platforms. Well the other day a client comes back to me and claims that their site has been crashing and always has when trying to print.Here is the problem:* sit…
Webbie wrote in to say...
Tags ! That’s it !
I could kiss you.
Fl0yd wrote in to say...
Just run into this problem myself. Our user’s couldn’t print our online docs… hmm, I had never had any probs in Firefox…
Bloody IE! Bloody Microsoft! I’ve wasted a good couple of hours on this…
websparc wrote in to say...
I appologise for previous comments as trying to put the html tags which are breaking IE while printing. It breaks IE6 and IE7 but works on firefox.
<div>
<input type="radio" disabled="disabled" checked="checked"/>Some
</div>
<table>
<tr>
<td>
<font color="black">File Number:</font></td>
</tr>
</table>
Received from Chad’s dailies » Blog Archive » links for 2007-03-29
[...] When Printing Kills (tags: ie bug printing) [...]
Rajneesh Garg wrote in to say...
I have my web page designed using DIVs. It also has a Display Tag component (JSP Taglib) which produces a grid using TABLE tab. When I issue print command (Ctrl-P) from this page, and chooses to have landscape mode, IE6 crashes. For Portrait mode, it works fine. I am not using tags as the div id or name. I have Windows 2003 Server running IE6 browser. No separate printing CSS is being used.
Any pointers?
Received from explorer 6, suma y sigue… • limalimon.com.es
[...] Este error, aunque parezca mentira, lleva documentado desde 2005 [...]
fab wrote in to say...
Some more reserved Ids:
On Internet Explorer 6, using id = ‘type’ or ‘description’ or ‘positioning’ will cause ie to crash if you try to access them via document.getElementByID….
That sucks
Received from Kill Internet Explorer With CSS
[...] I decide to investigate and sure enough Google comes through. Specific tags in your html code will cause Internet Explorer to crash when you try to print. [...]