I am developing an experiment for academic purposes. I have to questions.
1) I want to set automatic auto-advance, which I found out how to on this link.
I added the following code to the “Edit Java Script Question” box. Now I would like to make “forward” button disappear. Would any ne be able to tell me how to do so?
Qualtrics.SurveyEngine.addOnload(function()
{
var that = this;
this.questionclick = function(event,element){
if (element.type == 'radio') {
that.clickNextButton();
}
}
});
2) I would also like a sound to be played as soon as the page is loaded. I did so by adding the following line inside my "Qualtrics.SurveyEngine.addOnload"
document.getElementById("1_2_3").play();
I also added the following in the HTML view of the question:
<audio>
<audio id="1_2_3" src="the_link_to_my_audio_file_in_qualtrics_library">
</audio>
However, when I preview the question, there is a weird echo. It seems that that file is being played twice! How can I fix this?
Page 1 / 1
It is because you are in preview mode. It will play once for each frame (desktop and mobile). The echo will go away you are no longer in preview mode.
If it really bothers you, you can use JavaScript to look for 'preview' in the url, then find the audio in the mobile frame and mute it.
If it really bothers you, you can use JavaScript to look for 'preview' in the url, then find the audio in the mobile frame and mute it.
Is it possible the javascript for playing audio automatically on load is not working anymore? I found answers to similar questions from November and September and none of them are working for me.
I am looking for a way to play the audio file as soon as the slide is loaded (without requiring individuals to click on play).
I am looking for a way to play the audio file as soon as the slide is loaded (without requiring individuals to click on play).
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.