Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ScrollHeight and onload
Message
 
To
07/05/2014 09:32:11
General information
Forum:
Javascript
Category:
IFrame
Miscellaneous
Thread ID:
01599669
Message ID:
01599670
Views:
33
>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?

Can you debug it?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform