cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jarredtruschke1
Community Participant

Dynamic External Content Requires iframe Dynamic Height

Hey everybody,

I know, I just posted in here. I'm trying to solve multiple problems at once right now. I think they may actually be related in the future though.

Right now, we're dynamically loading content into pages via jQuery using DIV ids. This usually works, but isn't always reliable, and we've run into problems with doing this in Firefox.

The next iteration of this solution seems to be to load dynamic content from a page that creates dynamic content via an iframe with URL parameters that would inform the page which content to load. I can make this work easily enough, but the content is quite long, and so we get the infamous iframe scroller within the page, which we're really trying to avoid.

It seems simple enough to add an "onload" function to the iframe, then create a function in our global javascript that basically gets the height of the content that was loaded into the iframe, then set the height of the iframe through the code using the scrollheight parameter. A solution like this can be found here: https://stackoverflow.com/questions/9162933/make-iframe-height-dynamic-based-on-content-inside-jquer...

The problem is that Canvas strips out the onload parameter to an iframe. Does anybody have any workarounds that they've been able to implement to dynamically resize iframe height to the height of the content that's contained within it?

Thanks,

Jarred

Labels (2)
0 Kudos
0 Replies