Controlling captivate project that's inside a iFrame
I haven't seen anyone post about this yet,
I have a captivate html export that's going to be placed inside a iframe on another html page.
ex.
Parent html > iframe (captivate course)
The idea is, to be able to start the course and jump to specific slides from buttons on the parent page.
So the buttons needs to be able to communicate to the captivate project.
I haven't been able to figure it out how to do this.
I think it's the captivate functions below that are throwing me off on how to get the parent to communicate withe iframe.
.cpAPIInterface.getVariableValue()
.cpAPIInterface.setVariableValue()
Has anyone else been able to do this, I feel like i'm missing a step or not settings something up right.
Nothing I've tried haven't been able to reach the functions or variables in the course and they keep coming back as not defined.
var iframe= $("#eguide").contentWindow;
$("#btn1").click(function() {
iframe.cpAPIInterface.getVariableValue("cpInfoCurrentSlide");
alert(cpInfoCurrentSlide);
});
