I found applying the following function to a links onclose
works to close Fancybox from within an iFrame:
parent.$.fancybox.close();
I wan
no need to close fancy box just use
function name(){
self.parent.location.href='pageg.php';
}
Very simple solution... can't believe I didn't think of this!!!
<a href="http://www.domain.com/page/" target="_parent"> Close and go to page</a>
Sometime, I swear I try to make things more difficult than they actually are!
You can also do this by writing a function on the parent page:
function closeFancyboxAndRedirectToUrl(url){
$.fancybox.close();
window.location = url;
}
Then on the link within the iframe, you can do this:
<a onclick="parent.closeFancyboxAndRedirectToUrl('http://www.domain.com/page/');">Close and go to page</a>