Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. Dynamic Iframe Resizing on Multiple Layers

Dynamic Iframe Resizing on Multiple Layers

Scheduled Pinned Locked Moved JavaScript
helpjavascripthardwaretutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Phatinox
    wrote on last edited by
    #1

    Hi guys Its my first in this community and I hope someone can help me on this one. I’m currently working on the personalization of the layout of SAP ERP Portal. This Portal Framework uses Iframes to display the current page and/or applications on the Current Page. Here is a custom draw of a page ---- Custom Componentes Like Menus etc ----- Iframe (InnerPage) – Shows the Current Page --------This Page can have embedded content and/or More Iframes with Applications All the Iframes are on the same domain but I only have acess to the innerPage Code and not to the iframes that have the applications. Now we want the innerpage to automatic resize to the current content. This is being a problem (even after using jQuery Plugins or Resize Scripts) because: 1) The Iframes that have the applications change content height using Ajax/DHTML (not triggering load event) and this resize scripts wont call the resize mechanism. 2) I don’t have access to the applications source 3) On some tests ive made using Scripts ( for example Auto Height Jquery, SSI Dynamic Drive …) some iframes display the same clientHeight and ScrollHeight Even if theres a scrollbar in the browser window. If there’s anyone there that can help me solve this kind of situations it would be really helpful Thanks

    modified on Thursday, September 15, 2011 4:55 PM

    T G 2 Replies Last reply
    0
    • P Phatinox

      Hi guys Its my first in this community and I hope someone can help me on this one. I’m currently working on the personalization of the layout of SAP ERP Portal. This Portal Framework uses Iframes to display the current page and/or applications on the Current Page. Here is a custom draw of a page ---- Custom Componentes Like Menus etc ----- Iframe (InnerPage) – Shows the Current Page --------This Page can have embedded content and/or More Iframes with Applications All the Iframes are on the same domain but I only have acess to the innerPage Code and not to the iframes that have the applications. Now we want the innerpage to automatic resize to the current content. This is being a problem (even after using jQuery Plugins or Resize Scripts) because: 1) The Iframes that have the applications change content height using Ajax/DHTML (not triggering load event) and this resize scripts wont call the resize mechanism. 2) I don’t have access to the applications source 3) On some tests ive made using Scripts ( for example Auto Height Jquery, SSI Dynamic Drive …) some iframes display the same clientHeight and ScrollHeight Even if theres a scrollbar in the browser window. If there’s anyone there that can help me solve this kind of situations it would be really helpful Thanks

      modified on Thursday, September 15, 2011 4:55 PM

      T Offline
      T Offline
      twseitex
      wrote on last edited by
      #2

      Hi, iframe object see http://msdn.microsoft.com/en-us/library/ms535258.aspx The iframe element functions as a document within a document, or like a floating frame. The frames collection provides access to the contents of an iframe. Use the frames collection to read or write to elements contained in an iframe. Example sColor = document.frames("sFrameName").document.body.style.backgroundColor; frames collection see http://msdn.microsoft.com/en-us/library/ms537459.aspx iframe supports ID and NAME attributes too.

      1 Reply Last reply
      0
      • P Phatinox

        Hi guys Its my first in this community and I hope someone can help me on this one. I’m currently working on the personalization of the layout of SAP ERP Portal. This Portal Framework uses Iframes to display the current page and/or applications on the Current Page. Here is a custom draw of a page ---- Custom Componentes Like Menus etc ----- Iframe (InnerPage) – Shows the Current Page --------This Page can have embedded content and/or More Iframes with Applications All the Iframes are on the same domain but I only have acess to the innerPage Code and not to the iframes that have the applications. Now we want the innerpage to automatic resize to the current content. This is being a problem (even after using jQuery Plugins or Resize Scripts) because: 1) The Iframes that have the applications change content height using Ajax/DHTML (not triggering load event) and this resize scripts wont call the resize mechanism. 2) I don’t have access to the applications source 3) On some tests ive made using Scripts ( for example Auto Height Jquery, SSI Dynamic Drive …) some iframes display the same clientHeight and ScrollHeight Even if theres a scrollbar in the browser window. If there’s anyone there that can help me solve this kind of situations it would be really helpful Thanks

        modified on Thursday, September 15, 2011 4:55 PM

        G Offline
        G Offline
        greatghoul
        wrote on last edited by
        #3

        We got the same problem, and our solution is: 1. Set the outer iframe's height to "0" 2. Create a timer to watch every 5 seconds, if the inner iframe's height is larger than an expected value, then set the outer iframe's height to INNER_HEIGHT+15px 3. Kill the timer. It works, but results in some memory leaks in Internet Explorer.

        Ghoul To World! - http://www.g2w.me

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups