Using javascript in an external quiz engine to jump scenes

(Michael) #1

I have been trialling a quiz creation package and using the exported quiz in an iframe within a scene in hype.
I would like to go to the next scene if the quiz is successful and the quiz engine gives me the option of running javascript but Im unsure how to make this work and where the javascript would be placed.

This is a screen from the quiz engine


If you are running a Hype JavaScript function within an iframe then it won’t have access to the Hype scene (which is not at the same level) and the function won’t work. Since there is a ‘go to URL’ option with ‘Open in new browser window’ checked, you could potentially send the person to a ‘success’ scene using this technique:

So your scene name would be ‘Success’ and you could use a ‘go to url’ link containing that scene name as a hash like:

(Michael) #3

Thanks Daniel, Ill check that out