Hi, I've browsed through many websites and in here, and could not find a final answer as each one has its errors. I need to have an automatic IFrame height, meaning if the content changes, the Iframe must adapt its height to the content. For this I need to see how to get the correct content height?
As I understand the most correct way is to use : document.getElementById('myIframe').style.pixelHeight = document.getElementById('myIframe').contentWindow.document.body.scrollHeight;
This however doesnt work in all browsers correctly. in IE I see height is too small (has about 8 pixels less height than should). in Firefox when reducing the content size, the scrollHeight isnt reduced at all. and in Safari it doesnt work as well.
So , for final questions, what is the most correct, and proved working way of getting the content height - what height should the IFrame be set?
Thanks, Tal.