views:

219

answers:

1

The onresize function doesn't seem to run in Safari (3.03 beta windows edition) when an iFrame is resized by its parent. Is this a known bug, and is there any way to get around it besides a timer-based check?

The iframe and its parent are in the same domain, so calling the resize function from the parent would be doable except that the apparent means of calling a child frame's function - iframeObj.function(), where iframeObj is an object reference to the frame, only seems to work in IE and Opera; FF, Safari and Chrome all fail to run the function.

Thanks in advance for any help.

A: 

Though I still can't get the onResize function to run, I've worked around it using the second method - the correct function call is iframeObj.contentWindow.function(), for reference.

Though it's no longer so important, any info on the primary question would yet be appreciated.

wyatt
`iframe.contentWindow` is an IE extension. To cover more browsers you can say `'contentWindow' in iframe? iframe.contentWindow : iframe.contentDocument.defaultView`, which is standardised and available in older versions of non-IE browsers than `contentWindow`.
bobince
Thank you, I'll do that.
wyatt