I have a fancybox showing an iframe with some content from another domain.
I want to determine it's content's height when it's loaded. If I use
document.body.scrollHeight
(in the iframe content document's javascript), it gives me the right height in case there is a vertical scrollbar or the screen becomes higher. However if the iframe becomes smaller, that just gives me the previous height. I thought to solve this by using
document.body.height
then but that returns undefined. Is there another way to get the body's height (since the iframe content's body actually has the right height if I inspect it through the browser's developer tools? Or might it have something to do with the fact that the function is called in $(window).load?
Thanks