I'm embedding an iframe into a question like this in the HTML:
and I have the following in my JS:
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
var qid=this.questionId;
jQuery("#"+qid).css("width","50%", "position","fixed");
});
Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
let qid=this.questionId;
let urlstring = "(embedded website)"
jQuery("#"+qid).css({"position": "fixed", "width":"60%", "right":"20%", "z-index":"0"});
jQuery("#iframediv").html('');
let iframe = document.getElementById("iframe");
iframe.src = urlstring;
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
It loads in correctly, but doesn't allow scrolling of the main webpage, this is particularly an issue with mobile because I can't even reach the question itself. Thank you!