From randallwiggins
Jump to: navigation, search
(Created page with "AbcTunebook")
 
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
AbcTunebook
+
<html>
 +
<script type="application/javascript">
 +
 
 +
function resizeIFrameToFitContent( iFrame ) {
 +
 
 +
    iFrame.width  = iFrame.contentWindow.document.body.scrollWidth;
 +
    iFrame.height = iFrame.contentWindow.document.body.scrollHeight;
 +
}
 +
 
 +
window.addEventListener('DOMContentLoaded', function(e) {
 +
 
 +
    var iFrame = document.getElementById( 'iFrame1' );
 +
    resizeIFrameToFitContent( iFrame );
 +
 
 +
    // or, to resize all iframes:
 +
    var iframes = document.querySelectorAll("iframe");
 +
    for( var i = 0; i < iframes.length; i++) {
 +
        resizeIFrameToFitContent( iframes[i] );
 +
    }
 +
} );
 +
 
 +
</script>
 +
 
 +
<iframe width="100%" id="iFrame1" src="/plugins/abctunebook/index.html"></iframe></html>

Latest revision as of 06:05, 28 January 2019