Using the window-object when adding javascript code at the end of a survey | XM Community
Skip to main content

Hello,
As part of a workflow at the end of a survey, I would like to execute javascript code to send a message to the opener. However, it seems that the window-object is not known at that moment or cannot be accessed. Is this correct or am I making a mistake?
function codeTask()
{
window.opener.postMessage({ todo: 'todo', cat: 'qualtrics', act:'survey sent', lab:'offer request' }, '*');
return {
result: ""
}
}
Any help is extremely welcome :-)
Many thanks
Michael

Be the first to reply!

Leave a Reply