Question

Usually one would use:

document.location = 'http://www.mozilla.org';

or

window.frames[0].location.href = 'http://www.google.com/';

But the window and document objects dont seem to be accessible from my facebook iframe app. I even tried having an empty link getting that and calling click() on it but the <a> element doesnt support that method..

Was it helpful?

Solution

Here you go:

top.location.href = 'http://www.mozilla.org';

To change the iframe only:

location.href = 'http://www.mozilla.org';

Result:
Mozilla Page inside Facebook iframe

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top