iframe scroll height

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arvital
    New Member
    • Jun 2011
    • 1

    iframe scroll height

    first i did my research on this topic after reading and applying so many JS i posting this problem,

    i am trying to apply iframe in which i get content from some other domain.

    i m trying to set the iframe height on the base of scrollheight of the content inside the iframe but failed to do so

    i tried to use onload event of iframe but failed...

    please help me i need to set the height of iframe dynamically by any mean necessary ..

    if the code would be provided in Javascript that would be helpful to me

    Thanks in advance
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    The reason is that you've fallen foul of the same origin policy. In other words, you won't be able to access the content from the iframe via JavaScript because it's from another domain. One simple way around this is to serve the content from your own domain, but that will require server-side code.

    Comment

    Working...