HTML loads on click away only. | XM Community
Skip to main content
HTML content from "Qualtrics.SurveyEngine.addOnload(function()" loads only when I click away to the next survey page, not when the page itself loads. Is this a common bug? The code seems to work in the original survey but not when it is imported from a .qsf file.



EDIT: Two things. First, one page of HTML does load but following pages do not load. Second, HTML also does not load when survey is copied. It's been suggested that it is a survey ID issue, bit there is no reference to the survey ID in the HTML code. The original survey is in a custom Theme - could that be the issue?
It is not a common bug. addOnload is JavaScript, but you only reference HTML in your post. Do you have both custom HTML and JavaScript? HTML, JavaScript and CSS all have to work together. You can start by checking the console log to see if there are any JavaScript errors. It is also possible your HTML is formatted incorrectly (e.g. missing a close quote or close tag), so check it carefully. If that doesn't shed any light, post your HTML and JavaScript.



Note: post JS and html in fences like this:

\\`\\`\\`

code goes here

\\`\\`\\`



then it will look like:

```

code goes here

```

Leave a Reply