Function addOnload//addOnready not working fine with IE11 | XM Community
Skip to main content
Hi team,



I'm currently facing an issue with custom JS code with IE 11.

I'm trying to replace logo set up in look and feel especially for french user.

I have JS whichs works for chrome and IE11 (only the first page of the survey).

For the page after the one, this code isn't working fine with IE11 :



Qualtrics.SurveyEngine.addOnload(function()

{

var language = "${e://Field/Q_Language}";

var Url_Img = "${e://Field/Url_Img}";

if ( language == "FR" || Url_Img == "FR" )

{

var list = document.getElementById("Logo");

if (list.hasChildNodes())

{

list.removeChild(list.childNodes[0]);

}

var node = document.createElement("img");

node.src="https://geodisengagement.eu.qualtrics.com/ControlPanel/Graphic.php?IM=IM_7a2iKTdO9hBPljv";

document.getElementById("Logo").appendChild(node);

}

});



Qualtrics.SurveyEngine.addOnReady(function()

{

var language = "${e://Field/Q_Language}";

if ( language == "FR" )

{

var list = document.getElementById("Logo");

if (list.hasChildNodes())

{

list.removeChild(list.childNodes[0]);

}

var node = document.createElement("img");

node.src="https://geodisengagement.eu.qualtrics.com/ControlPanel/Graphic.php?IM=IM_7a2iKTdO9hBPljv";

document.getElementById("Logo").appendChild(node);

}

});



Do you have any idea about why ?



thanks in advance



regards
I believe addOnload and addOnReady is triggered per question. It's not triggered across block, so you might need to add the same addOnload or addOnready for the first question on the 2nd block (page), so it can be triggered again.

Leave a Reply