Hi there,
In my Qualtrics survey I am trying to get the next button to appear either after participants had made a response on a slider or autoadvance after 5 seconds. I've only been trying to figure out how to do this by using the mousedown command as I'm not sure how I'd code dragging a slider. This is what I have so far, its advancing after 5 seconds but the next button isn't appearing. Any help would be much appreciated!
var mouseDown = 0;
document.body.onmousedown = function() {
++mouseDown;
}
document.body.onmouseup = function() {
--mouseDown;
}
Qualtrics.SurveyEngine.addOnload(function()
{
this.hideNextButton();
if (mouseDown) {
this.showNextButton();
} else {
this.clickNextButton.delay(5);
}
});
Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
Please note I've never used JavaScript before!
Be the first to reply!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.