Hi, firstly can I say I'm not a Hype or javascript expert so any help will be welcome.
I'm using Hype as an html5 animation tool for elearning purposes. The main elearning course is built in Adapt and the Hype interactive animations will sit inside Adapt iframes. The idea is that Hype sends an interaction 'complete' message via postMessage to Adapt. The Adapt iframe is ready built to listen for a postMessage sending 'complete'. So the external iframe is the parent and Hype is the child.
If I put the following in a simple html page window.parent.postMessage('complete', '*'); on my web server and reference the html page within the iframe I can trigger the iframe interaction as complete without any issues.
I have built a test Hype page with a simple button and a javascript function using the same code but when it is all online (Adapt iframe and Hype animation inside) I'm not triggering the complete status.
I'm also running an alert on the button (which works) so I'm fairly sure the javascript postmessage function is running.
Could it be that the external iframe is not found with window.parent from inside Hype and needs something else putting into the javascript function.
Hi, thanks for the reply, I think this will be a bit of trial and error.
How do I use document.parentWindow.frames?
What/where should I see the result.
I'm guessing if it runs as a function inside hype it will return something on screen showing the frames?
Sorry to ask but I'm a graphics/elearning author not a programming expert.
Hi Hans, I haven't been able to resolve my iframe postmessage issue. Would it be possible for you to contact me directly at whitemiller@btinternet.com. I would like to discuss if I could maybe hire you on a paid basis to investigate for me.
Regards
Trevor