开发者

Keeping an iFrame static while the window reloads? (creative thinking needed)

Here's my problem:

  • I have a Flash object on my page.
  • The user can change views within the Flash. [Not directly relevant but possibly useful: when this happens, the Flash creates a JavaScript event.]
  • I开发者_运维技巧'd like to create separate Disqus comment threads for each Flash view, and according to Disqus's customer support, this needs a unique URL (not just hash fragment) for each comment thread.
  • It's not possible to write to the URL (as opposed to the hash fragment) without reloading the page (except in newer Webkit browsers).

However, I'd really like to avoid reloading the page, and having to reload the whole Flash object, each time the user changes views. But I'd really like to offer unique Disqus threads on each Flash view.

Can anyone think of a smart way I can get round this?

Could I put the Flash in an iFrame and not reload it when the rest of the page reloaded... or is that impossible?


You could put the cart before the horse and make an AJAX call to replace your main page content elements, so long as the <iframe> is a direct child of the <body> and the main content is a sibling (not a parent) of it.


That is impossible as the iFrame is part of the loaded page. The only, but very ugly, way to implement this is using a frameset..


Why not make two iframes? One as big as your body, the other one smaller, centered, and with a higher z-index. Then just navigate the bigger iframe and leave the rest of the page alone.

Yes, it's ugly. But ugly questions ask for ugly answers :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜