I'd like to be able to set up my survey so that when a participant gets to a block, a new window will automatically open that is a PDF. Basically the survey block would be an written response question that has key words above it, and the PDF that would open would be an article that those words came from so that the participant can see and scroll through it for reference while writing their answer.
I know that I can include a link in the block that they can click to open the PDF in a new window/tab, but I was hoping to automate that so that the PDF opens without them needing to click the link. From what I heard back from Qualtrics, this isn't a feature built into the system, but could likely be accomplished with by adjusting the HTML of the links. Any help would be much appreciated!
Thanks.
Is there a way to have a linked file open automatically in a new window?
Best answer by rondev
1 - this is working, but it's actually opening two new tabs of the file. Any idea why? => Since you must be testing in preview mode, the code runs twice once for dekstop view and another for mobile. Try to test using annonymous link, only one tab will get open.
2 - Is there a way to have that window automatically close when they move to the next block? => Use the below code and paste it as shown in the image:
var myWindow;
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
});
Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
myWindow = window.open("PDF_URL");
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
myWindow.close();
});
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
