tags:

views:

71

answers:

2

My site has an iFrame that displays content from and second site. I don't control the second site. When a user clicks on a link in the iFrame, I want it to redirect the entire page, not just the iFrame.

I've seen solutions for doing this from the iFrame, but I need to do it solely from the parent. I'd prefer to do it in the code behind, but a javascript solution would be acceptable.

+1  A: 

If the inline frame is external to your website then I'm affraid as far as I know there is nothing you can do

Tom Gullen
+1  A: 

Because of security reasons there is no way to extract any information from another page using javascript and therefore you cannot trigger an event for your parent window.

Kau-Boy
The only thing you can do is loading the whole page server side, add event handler to each link and then include it into the iframe. But that really isn't a good solution and it might be dangerous to do as you are chaning someone elses page and offer it on your own page.
Kau-Boy