@dedrick
To get the real iframe body height, you can follow these steps:
Here's an example of how you can implement this:
1 2 3 4 5 6 7 8 9 10 11 |
// Get the iframe element
var iframe = document.getElementById('your-iframe-id');
// Get the document inside the iframe
var iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
// Get the body element inside the iframe document
var iframeBody = iframeDocument.body;
// Get the real height of the body element
var bodyHeight = iframeBody.offsetHeight;
|
Replace 'your-iframe-id' with the actual ID of your iframe element. The bodyHeight variable will then contain the real height of the iframe body.