Limit JavaScript to one block (prevent layout changes) | XM Community
Skip to main content

We are conducting a study in which one part is an IAT that was created with the web app iatgen and inserted into the JavaScript of a Text Entry Question. Through that the layout of the entire survey has changed. We would like to limit the JavaScript to the blocks which contain the IAT and leave the rest of the survey unchanged. However, we are unsure why the rest of the study is even affected. We guessed that it might be due to the following code about QuestionID:

var qID =this.questionId;

qID = qID.replace("QID", '');

qID = parseInt(qID);

I uploaded one of the 7 parts of the code. Any help is appreciated!
IAT_part1.txt

The only thing that portion of the code does is populate the variable qID with the number of the QID.

If the entire layout of the survey is impacted it is probably something in Custom CSS that is doing it.


Thank you very much for the tip! A simple layout change did the trick.


Leave a Reply