Support » Plugin: Easy FancyBox » close from child window and resize

  • Resolved sauronz



    Is there any way to close the fancybox iframed window from the child one?

    Is the any way to resize the window from the child?

    I have tried a few ways, but no chance.


    Thnx for your help

Viewing 1 replies (of 1 total)
  • Plugin Author RavanH


    In theory, the javascript code parent.$.fancybox.close(); called from the iframe content should cause FancyBox to close, similarly with parent.$.fancybox.resize(); but … this is not true in all cases!

    For example, if the iframe content is a web page from another domain (other website) this will not work. The call is intercepted and blocked to prevent a real world security issue called “cross-site scripting”.

    Is your iframe content pulled from another domain than the domain of the original page from where you open FancyBox?

    If so, there might still be a way: create a file in your site root called crossdomain.xml filled with:

    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "">
        <site-control permitted-cross-domain-policies="all"/>
        <allow-access-from domain="*" />

    Where you replace the text * with that other domain name. The * is a wild-card to allow a wider scope of sub-domains (including www) for example, but can also be used on its own to allow access for ALL domains out there. But be warned, allowing cross domain access to sites you do not trust, DOES bring along a security issue! Read/search on Google for more…

Viewing 1 replies (of 1 total)
  • The topic ‘close from child window and resize’ is closed to new replies.