I'm using an iframe to integrate two of our customer's apps. I'd like the iframe's location to persist even when the top level window is refreshed.
Example:
- user loads http://myserver/main.page?target="sub.page" in his browser
- my javscript code sets the source of the iframe to "sub.page"
- user clicks a link within the iframe and the iframe's source becomes "othersub.page"
- user clicks a link within the top level window , outside of iframe, that links to http://myserver/main.page
- javascript somehow automatically updates the iframe's source back to "othersub.page"
I can workout all the logic I need to take the iframe update actions and pass variables around. My issue is how to track the iframe's src value.
I need a way to detect that the iframe's src has changed. The only thing I can think of is "polling" the value. I'd be interested to find out if someone has a better idea.
Thanks