我想在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();
}
});
- 谢谢!
答案 0 :(得分:1)
将此行添加到goInactive函数:
$('NextButton').click();
答案 1 :(得分:1)
根据官方文档LINK HERE
this.clickNextButton();