Paul Blakey
Paul Blakey

Reputation: 677

Reloading or redirecting the parent from a child iframe in safari

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.

Upvotes: 1

Views: 4431

Answers (2)

Bryan A
Bryan A

Reputation: 3634

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.

Upvotes: 1

ChaosPandion
ChaosPandion

Reputation: 78292

This doesn't work?

parent.parent.location.reload(true);

Upvotes: 0

Related Questions