The problem is that the code works perfectly if I have only a single video in my survey, but if I include a second video, the survey does not advance to the next screen once that second video is completed. There is also no initial alert, which suggests that the event calls for the second video do not execute.
I’m hoping that you could help me figure out where I’ve gone wrong and correct the problem. Thank you in advance!
Here is a direct link to the example that illustrates the problem I’m experiencing: the survey advances automatically after the first clip but not after the second one:
https://stlawu.qualtrics.com/jfe/form/SV_50TVe8wS1JC44nP
1. I placed the following in the header (Look & Feel/Advanced/Header):
script src="https://stlawu.az1.qualtrics.com/ControlPanel/File.php?F=F_5tcW6K6DuYVG57L" type="text/javascript"></script>
2. This is the HTML code placed with the first clip (note that the video is just a short YouTube video for illustration purposes):
iframe id="video1" allowfullscreen="" frameborder="0" height="360" width="640" src="https://www.youtube.com/embed/NOQDkYzhmho?enablejsapi=1&controls=0&disablekb=1&modestbranding=1&rel=0&showinfo=0&iv_load_policy=3" type="text/html"></iframe>
3. This is the HTML code placed with the second clip:
iframe id="video2" allowfullscreen="" frameborder="0" height="360" width="640" src="https://www.youtube.com/embed/pCCV3SKcJao?enablejsapi=1&controls=0&disablekb=1&modestbranding=1&rel=0&showinfo=0&iv_load_policy=3" type="text/html"></iframe>
4. Finally, since I don’t want to display the Next button when the videos are displayed, this Javascript is placed under Qualtrics.SurveyEngine.addOnload(function() for both first and second video clip questions.
this.hideNextButton();
_Note that I omitted "<" from the beginning of the code in 1, 2, and 3 to be able to paste the code here._
Best answer by mattyb513
View original