o_O
o_O

Reputation: 5737

Maintaining an iFrame with top.window refresh?

This is natural with a frame but not with an iframe. A top.window refresh with an iframe will reload the iframe as well. So use frame right? Well, no. In their infinite wisdom they deprecated it.

So I lose this functionality if I follow the rules?

I have to bring in an outside site and place it in a frame/iframe and it will process everything inside the frame/iframe. The URL, mysite.com has a frame/iframe with example.com by default. Then as the users navigates the content inside the frame/iframe, going to example.com/about.html, and then decides to reload top.window, I don't want it going back to example.com but to stay on example.com/about.

With the deprecated frame this works. With the "proper" iframe, this doesn't work. What can I do?

Upvotes: 0

Views: 220

Answers (1)

locrizak
locrizak

Reputation: 12281

You can communicate from the child page to the parent on differnt domains through the hash. You do have to have control of both domains in order to do this but it is definetly an option. What you would have to do is everytime the pages changes you update the hash on the iframe with the current url of the content in the iframe.

http://www.shubho.net/2010/08/cross-domain-communication-between.html

Upvotes: 1

Related Questions