Hi,
I collect data from an iframe embedded within the survey.
I grab the data and save it in the question text of an Equation type question.
I.e., Question Text:
Code:
<p id="test">....</p>
and help:
Code:
<script>
window.addEventListener('message', function(event){
document.getElementById("test").innerHTML = event.data;
});
</script>
This works in so far that the question text does change to the received data, however, both in a test question in the next question group and in the recorded answers the entry remains "...."
I tried to address the question directly from the script with the expression manager, i.e.,
Code:
<script>
window.addEventListener('message', function(event){
{GameData=event.data};
});
</script>
But that does neither change the question text nor the recorded answer.
I assume I just use the wrong syntax. Does anybody know a solution or workaround?
(LimeSurvey v.3.21.0+191203)
Thank you