I am trying to implement some JavaScript code so that when participants click on a button, a modal with some text pops up. Specifically, I am trying to implement this example: https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_ref_js_modal_js&stacked=h
I am somewhat familiar with JavaScript and HTML. I was able to implement everything so that the button is on the page and the modal opens when the button is clicked. However, when the modal opens, the entire screen is darkened by the overlay and everything is unresponsive to clicking -- so there is no way to close the modal or even click the button to progress to the next screen. Screenshots of the issue are below. I have tried tinkering with the overlay options for the modal and this doesn't change anything... I am stumped and was wondering if anyone knows what could be causing the issue?
Specifics:
-- I am using the exact code as in the example link above.
-- I put the header code in "Look & Feel" -> "header".
-- I put the JavaScript code in Qualtrics.SurveyEngine.addOnReady(function() {});
-- I put the HTML in the question text.
Question before clicking:
!
After opening modal:
!
Any advice would be greatly appreciated. Thanks in advance!
Best answer by TomG
View original