What’s wrong with this HTML?

Internet Explorer (version 6.0.2900.2180.xpsp_sp2_gdr.050301-1519IC – I swear I am not making that up!) reports “Problems with this Web page might prevent it from being displayed properly or functioning properly. In the future, you can display this message by double-clicking the warning icon displayed in the status bar.” The same page loads fine without error in FireFox 1.06, Mozilla 1.7.1, Opera 8.01 and Safari 2.0 (412.2). The page validates correctly using the W3C HTML validator as Transitional HTML 4.01. On Laura’s machine, IE says there’s an error on line 2, without further information. It seems suspicious that IE is the only one to detect an “error.” Can anyone spot the error on this page? (Besides grammar, syntax and content, wise guys 🙂

UPDATE: Found it. Of course, it was a trick question. There was nothing wrong with the HTML. And it was nothing I changed that caused the problem to appear, despite the proximity of changes to the error being found.

There was a small JavaScript call at the end of the third column that looked like this:

<script language="javascript" type="text/javascript" src="
http://technorati.com/embed/cddjc96gix.js">
</script>

And would generate a response that looked like this:

<!--
Profile not found or undisplayable
-->

All of the other browsers (FireFox, Safari, Opera 6 and 8, Camino, Mozilla 1.7.1 and 1.7.11) would gracefully ignore the comment and work fine.

IE, otoh, not only failed, but failed with a miserable error message that gave no clue what document had the error. If the error handler had indicated the JavaScript interpreter had the problem, I could have nailed this in a couple of minutes. Rack this up to lousy error messages, the bane of debugging everywhere!

Powered by WordPress. Designed by Woo Themes

This work by Ted Roche is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.