Resizing an iFrame

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DevInCode
    New Member
    • Apr 2008
    • 55

    Resizing an iFrame

    Hi
    I need to resize an iframe so that it doesn't show its scrollbars. It can't exceed this height by much. I need to open internal and external pages in this frame. Yes, I know it would be easier to open them in a new window, but thats not an option. Any suggestions?
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    on which base you want to do the resizing? ... i just ask because in case of external files you cannot read from the page ... since that would be against the same origin policy.

    kind regards

    Comment

    • DevInCode
      New Member
      • Apr 2008
      • 55

      #3
      well, I basically want the frame to have enough height so that it doesn't have a vertical scroll bar, so it is based on the size of the content of the iframe. No work around, huh?

      Thanks for response :)

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5388

        #4
        as i said ... for external pages you would be out of luck ... the external owner wants to and should have the only control about his content ...

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          There's one or two ways you could do this: if you serve the page from your domain, or if you control the external domain, you can add some code.

          One question though: what if the height of the page is very large?

          Comment

          Working...