【问题标题】:How to auto-advance due to inactivity on Qualtrics如何因 Qualtrics 不活动而自动前进
【发布时间】:2015-10-20 17:01:15
【问题描述】:

我想在 Qualtrics 调查中的参与者处于非活动状态 10 秒后自动将他们推进到下一个问题(在下一页上)。我的不活动代码运行良好(见下文,来自Kirupa),但我不知道如何强制调查继续进行。有什么想法吗?

代码:

Qualtrics.SurveyEngine.addOnload(function()
{
    /*Place Your Javascript Below This Line*/

    var timeoutID;

function setup() {
    this.addEventListener("mousemove", resetTimer, false);
    this.addEventListener("mousedown", resetTimer, false);
    this.addEventListener("keypress", resetTimer, false);
    this.addEventListener("DOMMouseScroll", resetTimer, false);
    this.addEventListener("mousewheel", resetTimer, false);
    this.addEventListener("touchmove", resetTimer, false);
    this.addEventListener("MSPointerMove", resetTimer, false);

    startTimer();
}

setup();

function startTimer() {
    // wait 10 seconds before calling goInactive
    timeoutID = window.setTimeout(goInactive, 10000);
}   


    function resetTimer(e) {
    window.clearTimeout(timeoutID);

    goActive();
}
 function goInactive() {
    // Here is where the auto-advance code needs to go

}

    function goActive() {

    startTimer();
}


});

-- 谢谢!

【问题讨论】:

    标签: javascript qualtrics user-inactivity


    【解决方案1】:

    将此行添加到 goInactive 函数中:

    $('NextButton').click();
    

    【讨论】:

      【解决方案2】:

      根据官方文档LINK HERE

      this.clickNextButton();
      

      【讨论】:

      • 这相当于我给出的答案。 Qualtrics clickNextButton 函数有一行,与我给出的答案相符。
      • 啊,够公平的!请确认。另一个答案。我以前肯定都用过!
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多