1

我已经使用 iframe 在网站中嵌入了日历。该代码工作正常,如下所述。但是,当我尝试使用 calendly 提到的代码隐藏 cookie 横幅和隐藏页面详细信息时,它不起作用。我正在尝试重新利用 iframe 中的日历代码。我将不胜感激。理想的解决方案是隐藏横幅。如果这不可能,那么下一个最佳解决方案是将横幅大小减小到日历大小。

网站:disashharma.ca 网址:https ://www.disshasharma.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>
4

0 回答 0