Hi all, I have this iframe for a data vis on this page here: https://cmpf.eui.eu/mpm-2020-infographics-test-page/
Our developer told me to add the function below to the page to fix the height of the iframe.
I added it to custom fields but I am unsure of what I put in this “//h is the iframe content
//set iframe height on page”
I haven’t been able to contact him. Does it mean just add the iframe code and what code would I use to set the height?
Any help appreaciated.
<script type="text/javascript">
window.addEventListener("message", function(event) {
if(event.data.type == 'resize')
refreshCmpfHeight(event.data.h);
});
function refreshCmpfHeight(h) {
//h is the iframe content
//set iframe height on page
jQuery('iframe').height(h);
}
</script>