Jesse Bilsten

19 May, 2009

Object instead of iFrame

Posted by: admin In: Technology| Web Design

I was working on a video player that had it’s controls rendered in HTML/CSS with Javascript hooks into a SWF file that actually streamed the video when I started looking at trying to use Object instead of an iFrame to display/share the project.  I read just about everything I could find on it:

After reading all of these articles and playing with the results I’ve come to a few conclusions:

  • IE doesn’t fully support object’s yet, no matter how you slice it.
  • Mozilla and the rest of the standards brigade don’t render the object when
    classid="clsid:25336920-03F9-11CF-8FD0-00AA00686F13"

    is within the object tag.

  • External content can be pulled through into an object tag using the data attribute.

So here’s essentially what everyone’s code looks like:

<object width="660" height="399" type="application/x-shockwave-flash"></object>

My problem? It doesn’t work reliably across all browsers. IE only renders it when it has a classid and the standards brigade doesn’t render it when it is there. There isn’t a solution that would allow a nice and tide sharing copy/paste line of text that works across all browsers like an iFrame…yet.  And in case you’re not following along, what I’m talking about is something like what YouTube does:

<object width="560" height="340" data="http://www.youtube.com/v/GggVSAPt-HY&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/GggVSAPt-HY&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object>

Microsoft, if you’re listening.  Please can you take a look at this and figure something out?  We’d all love to be standards compliant and strict even, but iframe is going the way of the dodo and object isn’t supported by that lovely browser that doesn’t seem to support anything cool.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • Twitter

1 Response to "Object instead of iFrame"

1 | Igor Plotnikov

August 27th, 2009 at 12:53 pm

Avatar

There’s another serious problem with using OBJECT instead of IFRAME.

I can’t figure out a way to script it to load new content as in:

obj.data=”newurl.html”

It works as expected in Firefox, but fails in IE, Chrome and Safari.

Without scripting the OBJECT tag instead of IFRAME is next to useless.

Comment Form

About

This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from.

 

May 2009
M T W T F S S
« Apr   Jun »
 123
45678910
11121314151617
18192021222324
25262728293031

Stories I Dugg