iframe bye-frame?
December 17th, 2002I’m building a web app in which I build the page from components. A section here on the page with its own elements, layout and control code, another one over there, insulated from the first. I’m using iframes because each one is self-contained, has its own JavaScript and DOM namespace, styles etc.
An alternative might have been to house each component in a positioned DIV, but the namespace issues and the dynamic reloading of the components made iframe the perfect tool.
Unfortunately, iframes seem to be being pushed out of the picture. XHTML Strict has no support for iframe. I understand it is to be deprecated.
In order to emulate the functionality that iframes provide, I may have to write code that enforces namespace via prefix and then div-loading code.
Anyone got any better ideas?
I think they want you to use the object element instead. See the note at the end here: http://www.w3.org/TR/html401/present/frames.html#h-16.5
Btw, the new XHTML 2.0 draft proposes to allow a src attribute on *any* element!
by Sjoerd Visscher December 17th, 2002 at 8:53 amBrent, based on what I figure you are trying to do, it looks like the method Sjoerd commented on is the way to go. See http://www.w3.org/TR/xhtml2/mod-object.html#s_objectmodule in the XHTML 2.0 draft.
Also, it seems that the first working draft of XFrames http://www.w3.org/TR/xframes was published at the same time as XHTML 2.0. According to this quote:
“XFrames is an XML application for composing documents together, replacing HTML and XHTML Frames”
you can see they’ve moved it out of XHTML.
Not much mention of iframes at all as they seem to have just dissappeared.
by Tim December 17th, 2002 at 10:07 amIs compliance with XHTML Strict really so necessary that we have to rob ourselves of such functionality? Until we have browsers that actually support XFrame (and assuming that we’re permitted to use them inline as we are with IFRAMEs), why not stick with XHTML Transitional for the time being?
by scottandrew December 17th, 2002 at 2:20 pmYes, that’s what we’re doing so far (transitional)but our plan is to make things as strict as we can because that will leave us in the best position to not have to do any big refactoring for the longest amount of time.
by Brent December 17th, 2002 at 2:42 pm“because that will leave us in the best position to not have to do any big refactoring for the longest amount of time.”
In THEORY. In reality, browser still aren’t ‘standard’ and there really isn’t a guarantee they will be in the future, so you really aren’t guaranteeing that things will be easier down the road just because you’re sticking with the standards now.
by D December 26th, 2002 at 2:36 pmI wish the W3C would have provided an alternative to iframe BEFORE deprecating it in XHTML Strict. That might have been a good idea 😉
by Jason May 31st, 2005 at 8:46 pmI wish the W3C would have provided an alternative to iframe BEFORE deprecating it in XHTML Strict. That might have been a good idea
AGREED. Using a src attribute in div tags in XHMTL 2.0 is pretty exciting though!
by dog_dude March 28th, 2006 at 10:17 amI have used “object” for inserting html page, but it doesn’t work. do you have a live example?
Thanks,
by aryan August 18th, 2006 at 9:27 amAryan
Browser not supported works, except that it will not display in IE unless you use some CSS to manually set the dimensions.
by Sanjay September 1st, 2006 at 4:48 amApparently the blog ate my code. I currently have an example at http://dracserver.dnsalias.com/test/iframe.html (I can’t guarantee how long it will be there though)
by Sanjay September 1st, 2006 at 4:50 amCan’t help technically but love the sound of this application.
by Web Marketing Mentor November 22nd, 2006 at 1:07 amhi ashley – since this post is still alive in comments, try this…
obtrusive iFrame with JQuery
by warren December 6th, 2006 at 6:49 pmI read somewhere that this problem with iframes is fixed now. But I can’t find it anywhere anymore. Does sombody know if this is fixed?
gr
Karel
by web marketing December 19th, 2006 at 2:42 pmThe Netherlands
It seems not to be clear if these problems are solved yet.Iframe is not the best functionality.
by Ed Bonink December 30th, 2009 at 8:09 am