SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Put someone else's web page in a box on my page

    I built an email web page in cooler email and I want to show it off on my portfolio site. Let's say it's theirurl.com/gregsemail/this.html

    How do I put someone else's web page in a box on my html formatted page?

  2. #2
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Well technically you could use an iframe but those are deprecated, you should link to their website rather than try to embed it (iframes have some big issues).

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your reply,

    Though not terribly insightful, it did make me think "what would google do?"
    So I did an image search, clicked on an image, and they return an image with the site in a window. I dicected the code, and found this works for what I need.

    My posts are not allowed to have working links yet (three more to go) so replace the "url goes here/" and it works!

    <iframe scrolling=auto id=rf src="url goes here/" frameborder=0 allowtransparency=true style="width:100&#37;;height:100%"></iframe>

  4. #4
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Location
    Boston
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AlexDawson View Post
    Well technically you could use an iframe but those are deprecated,...)
    FWIW: iframes are legal (valid) in xhtml transitional and html 5.

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The proper way, theoretically, would be to use an <object>, but that's poorly supported by IE.
    Birnam wood is come to Dunsinane

  6. #6
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by davidlaakso View Post
    FWIW: iframes are legal (valid) in xhtml transitional and html 5.
    While that is true, having cross domain iframes could have security implications, as well as having some major accessibility issues (the SEO issues aren't as much of an issue in this case as its purposefully linking to an alternative domain) but iframes are generally a bad idea, and no amount of redefining in my opinion will resolve those potential issues. Just because they can be used doesnt mean they should be used.

  7. #7
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Did the HTML5 people leave iFrame in because of the problems IE has with Object, or was there another reason?

    We have some of our forms in iframes on others' pages (so, not our code and we didn't do it) so that our back-end could process the form, who is sitting on their web site via an iframe. I've never investigated how well that works with <object> and the main problems I know of <object> wrt IE was to do with alternate children (which we wouldn't have, you either get the form or you don't and should go to our site itself then).

  8. #8
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    iframe is in HTML5 for the same reason img is in HTML5. object can be used for many different things, while img and iframe have specific uses. iframe and object also have different fallback models.

    Moreover, iframe is extended in HTML5 with the seamless="" and sandbox="" attributes. They aren't added to object because object has so many features already that it would become even more of a nightmare to implement. (Same reason we introduced the video element instead of using object.)

    That said, you can either use iframe or object to embed another HTML page. Any accessibility issues will likely apply equally to both of them, or it might even be worse with object because iframe is more commonly used and support for object might be poor.
    Simon Pieters


Tags for this Thread

Bookmarks

Posting Permissions

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