forked from rebillar/site-accueil-insa
40 lines
1.4 KiB
PHP
40 lines
1.4 KiB
PHP
<?php
|
|
ob_start(); // Start reading html
|
|
?>
|
|
<body>
|
|
-TEXTE-
|
|
|
|
<br><br>
|
|
<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
|
|
$pageContent = ob_get_clean(); // Store html content in variable
|
|
$pageTitle = "Commande";
|
|
include("includes/template.php"); // Display template with variable content
|
|
?>
|