forked from vergnet/site-accueil-insa
Photo test v6
This commit is contained in:
parent
4366cf1245
commit
2cedb658a6
2 changed files with 28 additions and 7 deletions
|
@ -1,12 +1,38 @@
|
||||||
<?php
|
<?php
|
||||||
ob_start(); // Start reading html
|
ob_start(); // Start reading html
|
||||||
?>
|
?>
|
||||||
|
<body>
|
||||||
-TEXTE-
|
-TEXTE-
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSeQ6ldsTuBGNN5hnp7KP_tt2rRuvRREJMvohjwsOhXCVCnECw/viewform?embedded=true" onload="resizeIframe(this)">Chargement…</iframe>
|
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSeQ6ldsTuBGNN5hnp7KP_tt2rRuvRREJMvohjwsOhXCVCnECw/viewform?embedded=true" id="ifrm" src="some-iframe-content.html">Chargement…</iframe>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function getDocHeight(doc) {
|
||||||
|
doc = doc || document;
|
||||||
|
// stackoverflow.com/questions/1145850/
|
||||||
|
var body = doc.body, html = doc.documentElement;
|
||||||
|
var height = Math.max( body.scrollHeight, body.offsetHeight,
|
||||||
|
html.clientHeight, html.scrollHeight, html.offsetHeight );
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setIframeHeight(id) {
|
||||||
|
var ifrm = document.getElementById(id);
|
||||||
|
var doc = ifrm.contentDocument? ifrm.contentDocument:
|
||||||
|
ifrm.contentWindow.document;
|
||||||
|
ifrm.style.visibility = 'hidden';
|
||||||
|
ifrm.style.height = "10px"; // reset to minimal height ...
|
||||||
|
// IE opt. for bing/msn needs a bit added or scrollbar appears
|
||||||
|
ifrm.style.height = getDocHeight( doc ) + 4 + "px";
|
||||||
|
ifrm.style.visibility = 'visible';
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById('ifrm').onload = function() { // Adjust the Id accordingly
|
||||||
|
setIframeHeight(this.id);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
<?php
|
<?php
|
||||||
$pageContent = ob_get_clean(); // Store html content in variable
|
$pageContent = ob_get_clean(); // Store html content in variable
|
||||||
$pageTitle = "Commande";
|
$pageTitle = "Commande";
|
||||||
|
|
|
@ -45,12 +45,7 @@ require_once $relativePath.'includes/score_functions.php';
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
<!-- End Matomo Code -->
|
<!-- End Matomo Code -->
|
||||||
<script type="text/javascript">
|
|
||||||
function resizeIframe(obj){
|
|
||||||
obj.style.height = 0;
|
|
||||||
obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
<body id="main">
|
<body id="main">
|
||||||
<div class="background" id="<?= $customBackgroundId?>"></div>
|
<div class="background" id="<?= $customBackgroundId?>"></div>
|
||||||
|
|
Loading…
Reference in a new issue