PDA

View Full Version : Using <object> instead of <iframes> for HTML page inside HTML page?



Luterin
04-01-2007, 10:50 PM
As the topic suggest, are there any drawbacks or limitations on using the <object> tag instead of the <iframe> tag to accomplish the same thing?

Since it looked like <iframe> is supposed to be phased out or something, <object> seemed to be the only alternative to me.

Ofcourse, much can be achieved with "just" AJAX, but if one really wants an inline frame, then....

Any thoughts about this?

mburt
04-01-2007, 11:00 PM
You can't display HTML pages with object (that of my knowledge). Use PHP includes instead.

Twey
04-01-2007, 11:57 PM
I think there are browser limitations... either IE or Firefox doesn't support it, I can't remember which.

Luterin
04-02-2007, 11:35 AM
You can't display HTML pages with object (that of my knowledge). Use PHP includes instead.

Yes you can providing links below. And PHP includes is serverside, so sort of negates my idea. But thanks anyway.

Here are some links with examples:
http://www.aplus.co.yu/web-dev/insert-html-page-into-another-html-page/
http://intranation.com/test-cases/object-vs-iframe/

Luterin
04-02-2007, 11:37 AM
I think there are browser limitations... either IE or Firefox doesn't support it, I can't remember which.

The links i provided in the above post works in both IS, NS and Mozilla/Firefox for me anyway. But there might very well be some other limitations that I have missed.

Twey
04-02-2007, 12:37 PM
Really? I haven't used <object> that way, so I could be out of date. You're probably right.