Welcome to WebmasterWorld Guest from 54.162.19.123

Forum Moderators: open

Message Too Old, No Replies

"dynamic" auto resize height of iframe

     
3:48 pm on Jul 5, 2011 (gmt 0)

New User

5+ Year Member

joined:July 5, 2011
posts:1
votes: 0


I am looking for a way to "dynamically" resize the height of an iframe based on the content it renders. Now, I have found a number of scripts online, as well as in this forum that address this sort of thing. My needs however are a little dirrerent.

The iframe I am using has a form in it. My problem is when the form inside the iframe is submitted, and the resulting content is much larger in height (a longer page), I would need the iframe to resize its height to match the new size of the content (after form submission).

I have found scripts that will initially size the iframe height on page load to the size needed of the form, but I cant seem to find a script that will "watch" the iframe and resize it dynamically as its contents change.

Is this possible? Many thanx.
3:55 pm on July 6, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


If you already have a script that performs the required action on page load then you could perhaps attach this to a timer event in the parent that 'watches' the iframe? I'm not aware of a change event on the iframe that would be triggered in the event that the iframes content dynamically changes, unless the source of the iframe itself is changed?
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members