Well, if you are just trying to reload the parent window after closing fancybox, just close fancybox from the open page (how you do it), for example
<script> parent.$.fancybox.close(); </script>
... and reload the parent page from yourself by adding an afterClose callback to your own fancybox script, for example
$(".fancybox").fancybox({ // other API options here afterClose : function() { location.reload(); return; } });
On the other hand, if you are not just trying to reload the parent page, but actually trying to redirect to another page, use window.location.pathname if you are using a relative path or window.location.href for the full path.
You can also try self.location.href .
NOTE : afterClose for fancybox v2.x, for fancybox v1.3.4 use onClosed instead.
source share