views:

34

answers:

3

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?

A: 

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..

halfdan
+2  A: 

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.

Robusto
does that update the URL, though?
AP257
@AP257: No. If you replace content programatically it doesn't update the URL. Just make sure you don't change the iframe.
Robusto
A: 

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 :)

Joeri Hendrickx