hello,
I have a survey where I'm asking respondents to listen to a piece of audio and then there are follow-up questions. I want to measure how long they spend on the page - so that I have a sense if they skipped around in the audio - and I want to have the 'Next' button appear only when they reach the end of the audio clip.
I added a timer and I'm using this JS for the Next button display:
Qualtrics.SurveyEngine.addOnReady(function() {
jQuery("#NextButton").hide();
jQuery("#"+this.questionId+" audio").on("ended", function() { jQuery("#NextButton").show(); });
});
The script worked fine before I added the timer, but now it just displays the button immediately when the block loads.
Is there a way to both show the Next button when the audio reaches the end and have a timer in place?
Thank you very much!
Show Next button when audio is played + have a timer
Best answer by ahmedA
That's probably because the timer question has an allow submit after option, which defaults to zero. Therefore, while you hide the next button, the timer question shows it instantly. Use this to add a delay. It will flash the next button for 500 ms and then hide it.
setTimeout(function () {jQuery("#NextButton").hide();},500) Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
