Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Continuing to next question from embedded jspsych experiment

  • tdevalk
  • tdevalk's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #200290 by tdevalk
Hi all,

I have added a question group containing one question, which is an embedded jspysch experiment. After this experiment has ended I wish the survey to continue with the next question. How can I do this?
The script I use has a condition for checking that the experiment ended:

window.addEventListener("message", function(e) {
// continue to next question
}, false)

Thank you!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #200291 by tpartner
Assuming that the experiment is sending a message when it ends, try this:
Code:
window.addEventListener("message", function(e) {
    $('#ls-button-submit').trigger('click');
}, false)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose