iframe resize events

M

msoliver

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top