我正在尝试在下面的页面中包含多个具有不同来源的高度调整iFrame:
https://succeed.serenova.com/lp-cloud-contact-center/
iFrame Resizer工作的唯一实例是第一个灯箱,它通过“获取我的免费现场演示”按钮和其他几个灯箱进行实例化。
灯箱的iFrame连接到“问题?”并且“下载Gartner报告”按钮不起作用,尽管以完全相同的方式实现。
这是调整大小之前的第一个灯箱:
成功调整大小后:
First iFrame After Successful Resize
之前的第二个:
Second iFrame Before Resize Attempt
调整失败后:
Second iFrame After Failed Resize
测试步骤:
或者,要自己复制:
提前感谢您的帮助!
答案 0 :(得分:0)
查看您的控制台日志
iframeResizer.js:634 Failed to execute 'postMessage' on 'DOMWindow':
The target origin provided ('https://pi.pardot.com') does not match the
recipient window's origin ('https://go.pardot.com').
您需要设置checkOrigin
属性来解决此问题。
https://github.com/davidjbradshaw/iframe-resizer#checkorigin