SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Oct 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Best way to load an external page

    Hi I have a site where I want to load an external web page in a fixed sized div element.

    How can I do this? Thanks.

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,051
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Not the best way but pretty much the only way without rewriting the other site or integrating your code into it is a iframe.
    The only code I hate more than my own is everyone else's.

  3. #3
    SitePoint Member
    Join Date
    Oct 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by oddz View Post
    Not the best way but pretty much the only way without rewriting the other site or integrating your code into it is a iframe.
    I tried with iframe. But the external content is wider than my iframe width. So scrollbars are visible. I want the full page shrink and fit in my iframe.

    Can I achieve this? Thanks.

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,051
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    You don't display the iframe. You hide the iframe and post to it.
    The only code I hate more than my own is everyone else's.

  5. #5
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,051
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    You don't display the iframe. You hide the iframe and post to it.

    Correction internet explorer has problems with this technique and hiding the iframe. The best with to do is to give it the dimensions of 1x1px and "hide" it without using display: none.
    The only code I hate more than my own is everyone else's.


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
  •