By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,784 Members | 2,933 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,784 IT Pros & Developers. It's quick & easy.

iframe resize events

P: n/a
Issue:
I want resize handlers within an iframe to be called when the main
window changes size. Alternatively, I'd like to know how to propagate
a resize event handled by the main window to iframe resize handlers.
What's weird is that the iframe resize handles do get called when
changing the browser horizontally, but _not_vertically_. I'm talking
about IE6/IE7.
Sample (simplified) code to explain what I'm talking about:
<html>
<script type="text/javascript>
window.onresize=onwindowsize;
function onwindowsize()
{
// this will always get called
}

<body>
<iframe id='frame1' src='frame1.htm'></iframe>
</body>
</html>
// frame1 src
<html>
<script type="text/javascript">
window.onresize=onframesize;
function onframesize()
{
// this only gets called when the browser is sized horizontally,
not
vertically
}

</script>
<body>
<p>frame content</p>
</body>
</html>
Hope this is clear.
Thanks!
- Mike
Oct 31 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.