我使用iframe在网站中嵌入了calendly。代码工作正常,如下所述。但是,当我试图隐藏cookie横幅和隐藏页面详细信息使用calendly提到的代码,它不工作。我试图在iframe中重新利用calendly代码。我将不胜感激任何帮助。理想的解决方案是隐藏横幅。如果这是不可能的,那么下一个最佳解决方案是将横幅尺寸减小到日历的尺寸。
网址:dishasharma.ca网址:https://www.dishasharma.ca/products/happiness-and-purpose-coaching-per-session屏幕截图:https://i.stack.imgur.com/Zn5kc.png
<iframe id="myIframe" width="100%" height="1050px" scrolling="no" frameborder="0">
</iframe>
<script>
let myIframe = document.getElementById("myIframe");
let url_string = "https://calendly.com/disha_sharma/session";
let calendlyBackgroundColor = "background_color=e9f4f5";
let calendlyHidePageDetails = "hide_landing_page_details=1"; // code not working
let calendlyHideBanner = "hide_gdpr_banner=1"; // code not working
let adsURL = url_string+"?"+calendlyHideBanner+"&"+calendlyHidePageDetails+"&"+calendlyBackgroundColor; // code not working
myIframe.src = adsURL;
</script>
<style type="text/css">
@media only screen and (min-width: 1050px) {
iframe#myIframe{
height="850px";
}
</style>
原始日历代码嵌入网站并隐藏横幅:
<!-- Calendly inline widget begin -->
<div class="calendly-inline-widget" data-url="https://calendly.com/disha_sharma/session?hide_landing_page_details=1&hide_gdpr_banner=1&background_color=e9f4f5" style="min-width:320px;height:1050px;"</div>
<script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js" async></script>
<!-- Calendly inline widget end -->
<style type="text/css">
@media only screen and (min-width: 1050px) {
.calendly-inline-widget{
height:850px;
}
</style>
1条答案
按热度按时间6xfqseft1#
这个问题可以通过向现有链路添加两个额外参数来解决:
&embed_domain=YOUR.DOMAIN.ANY
和&embed_type=Inline
所以最后,它应该是这样的:
https://calendly.com/YOUR_EVENT?hide_gdpr_banner=1&embed_domain=YOUR.DOMAIN.ANY&embed_type=Inline
请不要问为什么它不在日历文档中,但这是他们支持的解决方案。
我希望它能帮上忙!=)