OBJECT in Internet Explorer

admin

Administrator
Staff member
As per the W3C recommendations, I have tried to change the IMG tag to the OBJECT tag. However, my image file refused to be displayed in Internet Explorer, while Opera and Mozilla have no such problems. Any solutions or is this a IE bug? :rolleyes:<!--content-->No one knows how MS has implemented Object in IE,your best bet will be to embed img tag in between the <object></object> tag that way browsers that recoginse object will display image and the ones that don't will see img tag<!--content-->Why would one replace the img tag with object? I've never heard of that recommendation, where did you find this? It makes no sense semantically, and I don't see any advantages with using object to embed an image over img. Rather pointless...<!--content-->Khalid: I tried to embed the IMG tag, but IE treats the OBJECT tag as ActiveX. I then enabled all Activex controls without any success. Neither the embedded tag nor the alternate text was displayed.<br />
<br />
Bob: Yes OBJECT is the future of the IMG tag. I read it in a standard HTML book. HTML Validator (software) too recommends the change to OBJECT. For more information try this link <!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-html40/struct/objects.html">http://www.w3.org/TR/REC-html40/struct/objects.html</a><!-- m --> and see section 13.1.<!--content-->Hmm...<br />
Well, my suggestion is to continue using the <IMG> tag, since it is not yet depreciated. If the <OBJECT> method of including an image works in browsers other than IE, that suggests to me that you have coded it correctly. We all know how IE tends to render pages in a non-standard way. Perhaps this problem will be corrected in a future release of IE; personally, I do not think that it will. (That seems to be the way of Microsoft, lol)<!--content-->Originally posted by nichalp <br />
Khalid: I tried to embed the IMG tag, . <br />
<br />
Can I see your code object tag as well as embedded img tag?<!--content-->abc is my filename (suppose). Here's the code.<br />
<br />
<object data="images/abc.png" type="image/png" title="abc" id="abc"><br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"images/abc.png" alt="abc" title="abc" /> Alphabets</object><!--content-->IE does not support image as an object<br />
Your example does not work because; object is supported, but not as image so object shows nothing. The enclosed image is not shown, because an object, if supported, should not render any enclosed elements.<br />
A "catch 22" piece of coding.<br />
<br />
See some examples and (older)support:<br />
<!-- m --><a class="postlink" href="http://www.student.oulu.fi/%7esairwas/object-test/">http://www.student.oulu.fi/%7esairwas/object-test/</a><!-- m --><br />
<br />
It is not advisable to use object for images until IE has full support.<!--content-->LOL,<br />
<br />
That's what I said! :p<!--content-->
 
Back
Top