Support » Plugin: Easy FancyBox » [Plugin: Easy FancyBox] Launch mailto close fancybox in iFrame?

  • Resolved robgnyc


    How would I have a button (simple image wrapped in a href or <button>) both launch a mail to link and then close the fancybox window?

    I’m launching an iframe from the WordPress menu to show a disclaimer and want the user to click “I Agree” then get their email client launched and have the Fancybox close and leave them on same page they came from.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author RavanH


    Hi, from within an iframe, you can use the script javascript:parent.$.fancybox.close();. Note that the page inside the iframe needs to be on the same domain as the parent page for it to work.


    <a onclick="javascript:parent.$.fancybox.close();return true;" href="mailto:your@mail.addr&subject=agreement">I Agree</a>

    More info on

    I added this but it doesn’t seem to be working.

    The site is at:

    And link that launches the Fancybox comes off of the “Contact” submenu item (Blog Home About Contact) below the main blue menu bar.

    Added code exactly as written but modified for my mailto which is activated by the “I Agree to Terms” button.

    <a onclick="javascript:parent.$.fancybox.close();return true;" href=" for Ogletree Deakins Blog">

    Any help would be much appreciated.

    Plugin Author RavanH


    Sorry, that should be


    since WordPress runs jQuery in noConflict mode…

    Thanks that worked. Great support. Great plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Easy FancyBox] Launch mailto close fancybox in iFrame?’ is closed to new replies.