Desperate for help! HTML code disappearing - perhaps need JavaScript? | XM Community
Skip to main content

I am desperately needing to stop some of my HTML code from disappearing and/or being overwritten. I think it may be because I have to implement it as Javascript, but I really have no idea (I am not very knowledgeable about this...)
Here is the code:
image.png
The part that disappears is the part that goes from ...to
And then part gets replaced with other code. The part that goes from
At first I thought it was because I was missing an ending at the very end of the entire code, but that doesn't seem to have fixed the issue. 
I would be so grateful for any help. I'm supposed to launch this tomorrow!

Hi @kyu,
Please add the id to your button tag and use the below code in your questions JavaScript. Hope this helps!!
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
var cnt=0;
var MAX=1;

jQuery("#btn1").click(function(){
if(cnt < MAX){
cnt=cnt+1;
document.getElementById("playOnce").play();
console.log("The button was clicked." + cnt);
}
});
});


Leave a Reply