ASDSO Dam Safety Toolbox

Template: WhatLinksHere: Difference between revisions

From ASDSO Dam Safety Toolbox
Jump to: navigation, search
No edit summary
No edit summary
Line 15: Line 15:
<script type="application/javascript">
<script type="application/javascript">
   document.querySelector("iframe").addEventListener( "load", function(e) {
   document.querySelector("iframe").addEventListener( "load", function(e) {
    console.log(e.data);
    console.log(e.data.params);
    console.log(e.data.params.height);
     var iframeWin = document.getElementById("iframeWin");
     var iframeWin = document.getElementById("iframeWin");
     var content = (iframeWin.contentWindow || iframeWin.contentDocument);
     var content = (iframeWin.contentWindow || iframeWin.contentDocument);
Line 28: Line 33:
     // Show iframe
     // Show iframe
     iframeWin.style.display="block";
     iframeWin.style.display="block";
  });
  document.querySelector("iframe").addEventListener( "message", function(e) {
    console.log(e.data);
    console.log(e.data.params);
    console.log(e.data.params.height);
    // if (e.data && e.data.params && e.data.params.height) {
    //  document.getElementById("iframeWin").style.height = event.data.params.height;
    // }
   });
   });
</script>
</script>
</html>
</html>

Revision as of 13:28, 7 July 2023

Usage