Link to scene from iframe

Hey guys, I need your help.
The situation: I have placed an html widget on Scene 2 in my main document. In this HTML-widget the exportet HTML of another hype document opens up. Within this document there is a button leading me to Scene 1 in my main document.

To achieve that i used this javascript code:

window.parent.HYPE.documents[‘NameOfTheDocument’].showSceneNamed(‘SceneName’);

So far so good – works great in Firefox, but Chrome wont let me navigate.
Do you have any explanation or workaround?

Cheers, J.

It mainly boils down to sandboxing. If you want to program your own work around look into postMessage on the internet and this forum.

If you can adopt your project to custom behavior you could also use Hype GlobalBehavior (Custom Behavior Extension). Just include the Hype GlobalBehavior code in both hype files and then send a custom behavior like gotoSceneA and listen to it with #gotoSceneA on the receiving end.

1 Like

Thx Max, really cool script! Though too sophisticated for my use case :wink:
Also thank you for the hint using postmessage, that made it for me. :raised_hands:

2 Likes