tags:

views:

44

answers:

0

I want my parent page to refresh when I close a Fancy Box popup frame. I have a login page inside the popup, so I need the parent page to refresh to show the new login state when the Fancy Box closes.


I can get it to work without the iFrame code:

$(document).ready(function() {
$(”a.iframeFancybox1″).fancybox({
‘width’: 800,
‘height’: 450,
‘onClosed’: function() {
parent.location.reload(true); ;
}
});
});

But I can't get it to work with the iFrame code:

$(document).ready(function() {
$(”a.iframeFancybox1″).fancybox({
‘width’: 800,
‘height’: 450,
‘type’ : ‘iframe’
‘onClosed’: function() {
parent.location.reload(true); ;
}
});
}); 


The problem is to do with this line:
 ‘type’ : ‘iframe’
 As soon as I add that line, the popup stops working.


Can anyone suggest a solution as to how I can get an iframe to popup in Fancy Box, and still get the parent page to refresh when the box closes?
 Thanks!