jQuery | Communicate with postMessage
<!-- Iframe Container -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
var Iframe = jQuery('#iframe');
window.addEventListener('message', function(e) {
var eventName = e.data[0];
var data = e.data[1];
switch(eventName) {
case 'setHeight':
newIframe.height(data);
break;
}
}, false);
</script>
<iframe id="iframe" src="https://go.domain.com/form.html"></iframe>[/code]
[code language="html" light="true"][/code]<!-- Iframe Content -->
<script>
var StatusResizing = 'on';
setInterval(function() {
if(StatusResizing == 'on') {
resize();
}
}, 1000);
function resize() {
var height = $('body').outerHeight();
window.parent.postMessage(["setHeight", height], "*");
}</script>