Internet Explorer, printing and the error in preview.dlg

The day before holiday closing, a customer who recently we developed a web site calls me and say “Do you see our web site? Is impossibile to print due an error on script xyz”

On a firtst moment I got down from the clouds, also because AFAIK the print function is totally idipendent from the web site showed. In addition, customer wasn’t using a custom print button, but that one in the IE toolbar.

Since it was the day before holidays, both customer and us decided to shift the debug till today when we re-opened our office.
IE error while printing

After some tests (IE 7, Firefox, Safari, Opera), I wasn’t able to repro the error, so in a first moment I thought to a problem connected to it’s computer (also becuase that machine was recently infected by a virus) . But after a while, I think to his pc, an XP Sp2 with a slow Internet connection and so to the fact that he never update his pc with IE 7. So I open the virtual machine, load the XP Sp2 and … patatrac. Get the error.

Line 1401, then line 1200 … and so on. Lines that obviously wasn’t into html code that was just 100 rows. So the error couldn’t be in the html file (at least it wasn’t seem) also because the file was XHTML and CSS valid. But unfortunately the error was in every page, and get sistematically every time I was pressing the print button.

After some google research and some possible solutions like corrupted file (impossible to understand if file article speaks was the html file or IE file), unrealistic dll registration, I start to clear small parts of html code until I delete a div tag which id param was setup to tags. That was the matter: simply renaming the tag and magically all start back to work.

Once again a prove that IE should be trashed.

Technorati Tags: ,