Javascript error: TypeError: Cannot read property 'contentDocument'
Within the Captivate courses I have a "Web Object" for a JotForms form that the end-user needs to complete before proceeding.
Within Advanced Actions I have:
Conditional Statement - If "cpInfoCurrentFrame" is greater than "30"
Action: Pause
Additionally:
Action: Execute Javascript (Parent)
Javascript:
var iframe = document.getElementById("myFrame_Web_2c");
var innerDoc = iframe.contentDocument || iframe.contentWindow;
var btn = innerDoc.getElementsByClassName("form-submit-button");
btn.addEventListener("click",playCourse);
function playCourse() {
cp.movie.play(cp.ReasonForPlay.PLAYBAR_ACTION);
}
I have received TypeError: Cannot read property 'contentDocument'
when I add a Timeout function I receive var "X" undefined.
Any assistance is greatly appreciated.
