Difference between revisions of "Team:Tel-Hai"

Line 2: Line 2:
 
<head>
 
<head>
 
<script>
 
<script>
  function createIframe(ifrm){
+
var ifrm;
 +
  function createIframe(){
 
         var contentHeight = document.getElementById("globalWrapper").offsetHeight;
 
         var contentHeight = document.getElementById("globalWrapper").offsetHeight;
 +
        ifrm = document.createElement("iframe");
 
         ifrm.setAttribute("src", "http://igemtelhai.wixsite.com/telhaiigem");
 
         ifrm.setAttribute("src", "http://igemtelhai.wixsite.com/telhaiigem");
 
         ifrm.style.width = "100%";
 
         ifrm.style.width = "100%";
Line 12: Line 14:
 
   function resizeIframe() {
 
   function resizeIframe() {
 
         document.removeChild(ifrm);
 
         document.removeChild(ifrm);
         ifrm.style.width = window.innerWidth;
+
         createIframe();
         ifrm.style.height = (window.innerHeight-contentHeight-40) + 'px';
+
      // ifrm.style.width = window.innerWidth;
 +
         //ifrm.style.height = (window.innerHeight-contentHeight-40) + 'px';
 
   }
 
   }
  
 
   document.addEventListener("DOMContentLoaded", function(event) {
 
   document.addEventListener("DOMContentLoaded", function(event) {
 
     document.getElementById("sideMenu").style.display = "none";   
 
     document.getElementById("sideMenu").style.display = "none";   
    var ifrm = document.createElement("iframe");
+
 
     createIframe(ifrm)    
+
     createIframe() ;   
 
   });
 
   });
 
   
 
   

Revision as of 16:04, 20 August 2016