views:

653

answers:

2

I am generating an iFrame that following some processing with the frame (from an external site) redirects back to my domain (within the iframe), which should then reload the parent frame. However I've tried multiple ways of calling the parent, but none of them seem to work in safari?

methods use include.

self.parent.location="/";
self.top.location="/";
self.top.location.reload();

all of these just reload the iframe. it feels like it is losing the parent / top reference due to the redirects within the iframe.

A: 

This doesn't work?

parent.parent.location.reload(true);
ChaosPandion
nope, still just reloads the iframe
Paul Blakey
+1  A: 

Actually I've encountered this problem before and I believe the root of the issue is that this is a browser-security related issue. Try this -- it worked for me:

var reloadParent = self.parent.location.reload();;
setTimeout("reloadParent", 500);

Hope this works for you.

Plan B