Add the following iFrame snippet to your website HTML, adding in your public roadmap URL:
<div>
<iframe id="IframeId" src="YOUR_ROADMAP_URL" style="width:100%;" onload="setIframeHeight(this)"></iframe>
</div>
Next you need to add the following JavaScript snippet to your website HTML:
window.addEventListener('message', function (event) {
if (event.data.hasOwnProperty("FrameHeight")) {
$("#IframeId").css("height", event.data.FrameHeight);
}
});
Next you need to add another JavaScript snippet (below). On iFrame load you have to send message to iFrame window content with "FrameHeight" message. This function is already being called through the "onload" property on the iFrame snippet from step 1, but it's not been added to your website HTML yet, so add this:
function setIframeHeight(ifrm) {
var height = ifrm.contentWindow.postMessage("FrameHeight", "*");
}
window.addEventListener('message', function (event) {
if (event.data == "FrameHeight") {
var body = document.body, html = document.documentElement;
var height = Math.max(body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight);
event.source.postMessage({ "FrameHeight": height }, "*");
}
});