Capturing console.log information

This is a page to try and see how to send information from the embedded iframe (with the qualtrics survey) to the “parent” page (this page). Specifically, I’m thinking that we can probably send the responseId from Qualtrics to this page. Then, we can capture the response ID to send via the API back to qualtrics, which will allow us to do things like update the javascript for a particular question for a particular respondent/user.

There’s more information about how to do this at the following links:

https://stackoverflow.com/questions/14924362/capture-console-log-of-an-iframe
This actually might be a better option. See the section about communicating between the iframe and the parent. I think this could work. https://blog.logrocket.com/the-ultimate-guide-to-iframes/

//none of this code is actually doing anything, although it is the same code that  is 
//in the question in qualtrics. 
Qualtrics.SurveyEngine.addOnload(function()
{

var tester = "Hello World!";

console.log(tester);	

});

Qualtrics.SurveyEngine.addOnReady(function()
{

});

Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/

});

 

Leave a Reply

Your email address will not be published. Required fields are marked *