I have this code:
<iframe id='iFrame' src='iframe.php' onload='javascript:iFrameResize(this);'></iframe>
function iFrameResize(obj)
{
obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
}
It works fine when I first load the page. But, when I select something in the iframe and the content height is larger than the iframe height, the iframe does not resized.
Is there a way to always resize the iframe when it's content changes(the iframe location does not change, content is added/modified with javascript)?
Thanks in advance.
javascript:
pseudo protocol/label is unnecessary