Dear Qualtrics Community,
I'm new to HTML & Javascript and haven't been able to find a way to do this:
I need to embed text from a .txt file (or a .js file, if that's easier) on my github page into my survey question text. Importantly, I don't want an iframe – the text from github should embed seamlessly into the surrounding question text in Qualtrics. I've tried jQuery.get and ajax, but haven't gotten them to work, so I worry I might be getting something fundamentally wrong.
This is what I've tried so far:
in HTML, and the following Javascript:
Qualtrics.SurveyEngine.addOnload(function()
{
var url = 'https://raw.githubusercontent.com/example_URL.txt';
jQuery.get(url, function(data) {
$('#GithubText').text(data);
});
});
(This is an approach I copied from here)
As mentioned above, I'm a complete beginner – so any ideas on how to get this working would be much appreciated!! Thank you!