 <p>Here is an example script:</p> <pre><code>&lt;script type="text/javascript"&gt; if (top != self) { var wicket = top.Wicket; if (wicket &amp;&amp; wicket.Window) { var modal = wicket.Window.get(); if (modal) { modal.close(); } } top.location.href = location.href; } &lt;/script&gt; </code></pre>