Displaying picture using OBJECT tag when run under compatibility mode in IE11

236 views Asked by At

My web application was originally written in HTML. I am steadily converting it into HTML5, but some pages still run under Compatibility Options / Emulation / Mode / Document Mode = 5 in Internet Explorer. (This is set programmatically for individual HTML pages.)

Here is a code snippet that is supposed to display a picture, and is run under compatibility mode, as above.

<TD style="border: 1px solid black;" rowspan="6">
   <object id="bcobject"   data="<%=examplePic%>" height="730" width="516">
      <p>
        Could not be displayed - <a href="<%=fullFileName%>" 
        target="_blank" >Click to download</a>
      </p>
   </object>    
</td>

There are three computers in the office, all running the latest version of Internet Explorer 11 on Windows 10 Pro computers. Two of them will display the picture. One of them will display the "Could not be displayed"

For this one computer, I also tried running Internet Explorer without add-ins, but to no avail. (The picture does display on this computer, if the document-mode is changed)

Any ideas? (I do not want to replace the code with more conventional ways of displaying a picture, because I need the OBJECT tag, as there is other code which will later replace the picture with a PDF. I also am not ready at this stage to convert this entire page to HTML5)

1

There are 1 answers

0
gordon613 On

I gave up trying to solve this, and instead converted the page to HTML5. With legacy code there is always the question of the balance between how much time to invest in "fixes" as opposed to redoing it.

With regard to my original question, it appeared that not all versions of IE11 on the three computers were equal, and that the very latest IE11 had a problem with displaying the picture in legacy mode 5 and 6, but did from 7 onwards.