Is it possible to hide a question until media finishes playing? | XM Community
Skip to main content
I have embedded audio that is set by JavaScript do the following:

1-hide next button until it is finished playing

2-hide media player after audio finishes playing



But, I can't seem to be able to hide the next question until the audio finishes playing. Can this be solved with JavaScript code? And if so, how can this be accomplished?



Thank you!
I assume this next question is on the same page?

You just need to know the element ID of the thing you want to hide (easiest way to find this is to "inspect" the web page in preview mode). Then add this line to your javascript function.

document.getElementById("elementid").style.display = "none";

And to show it use style.display = "block"; or whatever it was originally.



You can also use embedded fields to set variables that can be accessed from a different question but is unnecessary if the questions are on the same page.

Leave a Reply