www.webdeveloper.com
Results 1 to 9 of 9

Thread: OBJECT in Internet Explorer

  1. #1
    Join Date
    May 2004
    Posts
    69

    Arrow OBJECT in Internet Explorer

    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?

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,119
    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
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  3. #3
    Join Date
    Jul 2003
    Location
    New York City
    Posts
    2,771
    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...

  4. #4
    Join Date
    May 2004
    Posts
    69

    Exclamation

    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.

    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 http://www.w3.org/TR/REC-html40/struct/objects.html and see section 13.1.

  5. #5
    Join Date
    Jan 2004
    Location
    Alabama, United States
    Posts
    836

    Curious

    Hmm...
    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)

  6. #6
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,119
    Originally posted by nichalp
    Khalid: I tried to embed the IMG tag, .
    Can I see your code object tag as well as embedded img tag?
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  7. #7
    Join Date
    May 2004
    Posts
    69

    The tag

    abc is my filename (suppose). Here's the code.

    <object data="images/abc.png" type="image/png" title="abc" id="abc">
    <img src="images/abc.png" alt="abc" title="abc" /> Alphabets</object>

  8. #8
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    IE does not support image as an object
    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.
    A "catch 22" piece of coding.

    See some examples and (older)support:
    http://www.student.oulu.fi/%7esairwas/object-test/

    It is not advisable to use object for images until IE has full support.

  9. #9
    Join Date
    Jan 2004
    Location
    Alabama, United States
    Posts
    836
    LOL,

    That's what I said!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles