2015-10-20 32 views
0

我希望在參與者進行Qualtrics調查後自動推進到下一個問題(下一頁),他們已經停用了10秒。我的不活動代碼工作正常(請參閱下面的Kirupa),但我無法弄清楚如何強制調查繼續。有任何想法嗎?如何由於Qualtrics上的不活動而自動前進

代碼:

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(); 
} 


}); 

- 謝謝!

回答

1

此行添加到goInactive功能:

$('NextButton').click(); 
1

每官方文檔LINK HERE

this.clickNextButton(); 
+0

這是我給出的答案是等價的。 Qualtrics clickNextButton函數有一行,與我給出的答案相匹配。 –

+0

啊,夠公平的!請確認。另一個答案。我以前絕對使用過! –

+0

答覆已確認。 –

相關問題