Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1433877

    I have embedded an external page using the ‘div’ tag. On this page, there is a lightbox that can be opened. However, when opening this lightbox, the text from WordPress is displayed over the image. Unfortunately, I am not a programmer and would appreciate any help.

    Embedding code::
    <div data-embedded-src=”https://www.autoscout24.ch/de/hci/list?design=85&filter=676&#8243; class=”embedded-content-area”></div><script src=”https://www.autoscout24.ch/MVC/Content/as24-hci-desktop/js/e.min.js”></script&gt;
    <script>
    (function(loader){
    loader
    .onMessage(“open-gallery”, function openGallery(){
    // code on opening the gallery
    document.getElementById(“header”).style.display=”none”
    document.getElementById(“footer”).style.display=”none”
    document.getElementById(“socket”).style.display=”none”
    })
    .onMessage(“close-gallery”, function closeGallery(){
    // code on closing the gallery
    document.getElementById(“header”).style.display=””
    document.getElementById(“footer”).style.display=””
    document.getElementById(“socket”).style.display=””
    });
    }(window._embeddedContentLoader));
    </script>

    • This topic was modified 9 months, 3 weeks ago by pmontani.
    #1433912

    Hey pmontani,
    When I check your page the external page is not showing because your site has this error:
    ERR_BLOCKED_BY_RESPONSE.NotSameOrigin 403 (Forbidden)
    This means that your site will not show the content because is Not the Same Origin or domain as the source site.
    To correct this you need to ask the other site to change their Cross-Origin Resource Sharing (CORS) so their content will show on your site. Then you can adjust the script above to also hide the other elements:

    (function(loader){
    loader
    .onMessage("open-gallery", function openGallery(){
    // code on opening the gallery
    document.getElementById("header").style.display="none";
    document.getElementById("footer").style.display="none";
    document.getElementById("socket").style.display="none";
    document.getElementById("av_section_1").style.display="none";
    document.getElementsByClassName("flex_column.avia-builder-el-4").style.display="none";
    })
    .onMessage("close-gallery", function closeGallery(){
    // code on closing the gallery
    document.getElementById("header").style.display="";
    document.getElementById("footer").style.display="";
    document.getElementById("socket").style.display="";
    document.getElementById("av_section_1").style.display="";
    document.getElementsByClassName("flex_column.avia-builder-el-4").style.display="";
    });
    }(window._embeddedContentLoader));

    Best regards,
    Mike

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.