igagen
igagen

Reputation: 83

Javascript redirect within Facebook app iframe

I'm trying to do a redirect via JS within an FB app in an iframe and it's busting out of the iframe.

Currently it looks like this:

window.location.href = '/bla'

But this is busting out of the iframe. How do I ensure the redirect occurs, but only within the iframe?

Upvotes: 0

Views: 1488

Answers (2)

milanchandna
milanchandna

Reputation: 423

try this.

self.location.href='/bla';

Upvotes: 0

Luca Simonetti
Luca Simonetti

Reputation: 127

Try wit this:

window.top.location.href = "http://www.example.com"; 

Upvotes: 1

Related Questions