Line 2: | Line 2: | ||
<head> | <head> | ||
<script> | <script> | ||
− | + | function createIframe(ifrm){ | |
− | + | var contentHeight = document.getElementById("globalWrapper").offsetHeight; | |
− | + | ||
− | + | ||
− | + | ||
ifrm.setAttribute("src", "http://igemtelhai.wixsite.com/telhaiigem"); | ifrm.setAttribute("src", "http://igemtelhai.wixsite.com/telhaiigem"); | ||
ifrm.style.width = "100%"; | ifrm.style.width = "100%"; | ||
ifrm.style.height = (window.innerHeight-contentHeight-40) + 'px'; | ifrm.style.height = (window.innerHeight-contentHeight-40) + 'px'; | ||
document.body.appendChild(ifrm); | document.body.appendChild(ifrm); | ||
− | } | + | } |
function resizeIframe() { | function resizeIframe() { | ||
+ | document.removeChild(ifrm); | ||
ifrm.style.width = window.innerWidth; | ifrm.style.width = window.innerWidth; | ||
ifrm.style.height = (window.innerHeight-contentHeight-40) + 'px'; | ifrm.style.height = (window.innerHeight-contentHeight-40) + 'px'; | ||
} | } | ||
− | + | document.addEventListener("DOMContentLoaded", function(event) { | |
− | window.onresize = resizeIframe; | + | document.getElementById("sideMenu").style.display = "none"; |
+ | var ifrm = document.createElement("iframe"); | ||
+ | createIframe(ifrm) | ||
+ | }); | ||
+ | |||
+ | window.onresize = resizeIframe; | ||
</script> | </script> | ||
Revision as of 15:59, 20 August 2016