Superbox Iframe automatically close

Create issue
Issue #73 resolved
Marcel Enzler created an issue

Hi

I generate a box containing an iframe <a href="login.php" rel="superbox[iframe][450x450]">Login</a>

After Login i will automatically close the iframe and refreh the main page.

Is it possible and how show the code for automatically close the iframe and refreshing the main page?

Comments (2)

  1. Marcel Enzler reporter

    i have solve this issue: 1) change the code in superbox.js: a=i('<p class="close"><a id="closethis"><strong><span>'+w.closeTxt+"</span></strong></a></p>").prependTo(q).find("a");

    2)after loading superbox.js: function closeBox() {jQuery(function($){ $("#closethis").click(); top.location.reload(); });}

    3) To close in a iframe: <script type="text/javascript" language="JavaScript"> window.parent.closeBox(); </script>

  2. Log in to comment