1

I am trying to find a iframe equivalent or alternate method of inserting a page into another page, the page will still need to be active, and when I submit a form or click a link within it, it will need to function like an iframe. I know iframes still work, but now that they have been depreciating over several years, I would like to find a new method. Is there one, and what kind of scripting am I looking at?

  • 4
    possible duplicate of [Are IFrames (HTML) obsolete?](http://stackoverflow.com/questions/755795/are-iframes-html-obsolete) - not an *exact* duplicate per se, but the answer is the same answer - it is not deprecated, is [included in HTML5](http://dev.w3.org/html5/spec-author-view/the-iframe-element.html), and invaluable in some case (like ads, facebook or other cross-domain features) – Kobi Jan 05 '12 at 19:11

2 Answers2

1

My answer: No, there is no alternative, at least if you need to embed a page with another domain.

It is logical because you shouldn't have any cross domain access to an embedded page (for example https://americanbank.com/), which can only be guaranteed if the embedded site is captured inside a frame. And since that kind of frame is exactly the iframe, there is no space for alternatives and no reason to not use it.

EDIT: Well I have to concede there are some tricky ways but never without accessing a server side dynamic site via AJAX. So it is somehow possible but not with a comparable effort.

Matteo B.
  • 3,906
  • 2
  • 29
  • 43
  • Thanks for the EDIT... I think that was where the misunderstanding was with Johnathan and I... I thought he meant inserting his own pages in into another to be active... which to me sounded like an AJAX app... so yeah, if he is trying to display someone else's whole site inside his page IFRAME is it for now. – one.beat.consumer Jan 06 '12 at 01:02
0

You can ajax in external pages that is very similar to an iframe. jQuery makes this really easy.

JohnathanKong
  • 1,307
  • 3
  • 21
  • 36