Display and center fancybox on the parent page instead of the child iframe

Forums Easy FancyBox Pro Display and center fancybox on the parent page instead of the child iframe

Viewing 2 reply threads
  • Author
    • #15599
      Philippe Sudan

      I am using FancyBox on a child page of an iFrame (see this link https://mdc2020.reconnaissance-dev.com/sponsors-iframe/ ) When I try to open the FancyBox from the parent page https://mdc2020.reconnaissance-dev.com/sponsors/ the overlay and the centring of Fancybox is in relation to the child page. I would like to have the overlay and the centring as the parent page.

      At the moment this is all on the same site but once in production, I will have a resource site with all the different child iframe pages which will be used on 10 different conference site as this is for sponsor pages.

      Through some google searches it seems to be possible but my Javascript knowledge is basically none existent.

      Not sure if you can help with this?

    • #15617

      Hi Philippe, there is one crucial condition for opening a light box on the parent frame: both parent and child frame must live on the same domain. If not, the script will be blocked by any browser that respects cross-site scripting security.

      Next, it’s important to realize that this is not possible with the standard WordPress plugin. It would either need a heavy modification or (better) a custom implementation of the light box script on the child page.

      I’m afraid this is out of the scope of possibilities of Easy FancyBox…

    • #15618
      Philippe Sudan

      Hi Ravan,

      Thanks for your feedback, it is what I thought. I am currently moving away from iFrame and looking at HTML Includes.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.