Code works only on Look & Feel | XM Community
Skip to main content

Hi,
I have a custom java script code that I had a professional programmer prepare for me since my knowledge is limited. The code works well in the internet, but I am having difficulty putting in Qualtrics.
The code works when I preview it in Look & Feel. See below (it is a game).
image.png
But doesn't work in preview mode or normal published mode. See below:
image.pngAny ideas for why this happens?
Thank you!

It's almost impossible to say anything without looking at the code or the errors that come up.
If you are not comfortable sharing it, you can start by opening the dev tools and seeing what is the error being thrown.


Hi ahmedA,
Thanks for replying.
I can share the code. Thank you for looking into it.
This is in one the only question of the survey. There is nothing in header, footer or CSS.




 <br>   Simple Javascript Minesweeper<br> 





  ">https://code.jquery.com/jquery-3.5.0.js">
 
  ">https://netlify.app/index.js">
 



 

Lives:


 

Moves:


 

Mines Identified: out of



 

Status:




 







Move everything after the line

  till before the line 
id
="myModal" 
class
="modal">
to your header.
Only have this in your question HTML:
        
            
                ×

                


            

        


        

Lives: 



        

Moves: 



        

Mines Identified:  out of 



        

Status: 



        


Add this to your question javascript addOnReady:
mine.reset();



Thank you!
My problem now is that I have some script that I am trying to put in the header, but Qualtrics doesn't see it as a script.


Leave a Reply