Template: WhatLinksHere: Difference between revisions
From ASDSO Dam Safety Toolbox
No edit summary |
No edit summary |
||
Line 21: | Line 21: | ||
iframeWin.contentWindow.document.getElementById('maincontentwrapper').style.marginLeft = "0px"; | iframeWin.contentWindow.document.getElementById('maincontentwrapper').style.marginLeft = "0px"; | ||
iframeWin.contentWindow.document.getElementById('maincontentwrapper').style.paddingLeft = "0px"; | iframeWin.contentWindow.document.getElementById('maincontentwrapper').style.paddingLeft = "0px"; | ||
// Hide header, heading, back link & footer | // Hide header, heading, back link & footer | ||
content.body.getElementsByTagName("header")[0].style.display = "none"; | content.body.getElementsByTagName("header")[0].style.display = "none"; | ||
Line 33: | Line 29: | ||
iframeWin.style.display="block"; | iframeWin.style.display="block"; | ||
}); | }); | ||
window.onload = function() { | |||
var iframe = document.getElementById("iframeWin"); | |||
console.log(iframe.contentWindow.document.body.scrollWidth); | |||
console.log(iframe.contentWindow.document.body.scrollHeight); | |||
iframe.width = iframe.contentWindow.document.body.scrollWidth; | |||
iframe.height = iframe.contentWindow.document.body.scrollHeight; | |||
} | |||
</script> | </script> | ||
</html> | </html> |
Revision as of 13:42, 7 July 2023
Usage