IFrame Widget
A simple integration where we provide you a pre-configured IFrame URL. You use our script to implement it on the website.
General
How it works
<div id="inside-this-element"></div>
<script>
(function() {
'use strict';
// Adds an event listener in order to resize the iframe to an optimal
// size for the page
window.addEventListener('message', function(e) {
var iFrameID = document.getElementById('mfn-iframe');
var eventName = e.data[0];
var data = e.data[1];
switch(eventName) {
case 'setHeight':
iFrameID.height = data + 'px';
break;
}
}, false);
var ifrm = document.createElement('iframe');
var c = document.getElementById('inside-this-element');
c.innerHTML = '';
ifrm.setAttribute('src', 'WIDGET_URL');
ifrm.setAttribute('width', '100%');
ifrm.setAttribute('frameBorder', '0');
ifrm.setAttribute('id', 'mfn-iframe');
ifrm.setAttribute('scrolling', 'no');
c.appendChild(ifrm)
})();
</script>
Example

Last updated
Was this helpful?