I have the following in the body line of an IFrame so to call a function which will give me the exact height of the frame:
<body id="LXBody" onload="GetHeight()">
This is the GetHeight() function:
function GetHeight()
{
loIFrame=window.parent.document.getElementById("IFrameMenu")
loIFrameDocument=loIFrame.contentDocument || (loIFrame.contentWindow && loIFrame.contentWindow.document)
nIFrameMenuPreviousHeight=loIFrameDocument.body.scrollHeight
}
This is really called after the load of the page is done. The nIFrameMenuPreviousHeight value however is from the HTML page default 2000 height value I have given.
Then, on the page, I have a button. If I click on that button, it execute the same code and gives the proper value.
So, something is not working accordingly to what is expected. The GetHeight() function called after the page has finished loading should give the proper value of 1327. But, only when I click on a button, I obtain it.
Anyone would see what is wrong here?