T
Tom
Hi,
I have an iframe that gets its own width from document.body.clientWidth
(on onLoad).
In Firefox, clientWidth always has an expected value, but in IE 6 it's
sometimes 0! It seems to depend on the loading of the containing page,
because in local tests IE 6 works fine. Also works when refreshing the
iframe after the containing page has loaded.
Is there a better way to get the width of an iframe from _within_ the
iframe? I've tried scrollWidth, offsetWidth and
parent.framename.frameElement.width -- latter works but only if
containing page is in same domain as iframe, which isn't always the
case.
window.setTimeout to delay the script would be a last resort.
Thanks for any ideas.
Thomas
I have an iframe that gets its own width from document.body.clientWidth
(on onLoad).
In Firefox, clientWidth always has an expected value, but in IE 6 it's
sometimes 0! It seems to depend on the loading of the containing page,
because in local tests IE 6 works fine. Also works when refreshing the
iframe after the containing page has loaded.
Is there a better way to get the width of an iframe from _within_ the
iframe? I've tried scrollWidth, offsetWidth and
parent.framename.frameElement.width -- latter works but only if
containing page is in same domain as iframe, which isn't always the
case.
window.setTimeout to delay the script would be a last resort.
Thanks for any ideas.
Thomas