Hello,
I have Page A with survey embedded using iframe and at the end of the survey I am trying to redirect to a Page B with parameter based from the survey. At the end of the survey block I added this piece of code to open Page B but that resulted in new tab so I am trying to close the Page A, so users don't get confused with the multiple tabs.
Is there a way to either open Page B on the same tab as Page A Or Open Page B in new tab and close Page A .
This is my code
Qualtrics.SurveyEngine.addOnReady(function()
{
window.open(Page B);
window.top.close(); -- this is for closing for Page A
});
Page 1 / 1
Try using window.location.replace(Page instead. This will open Page B in the current tab/window and prevent the user from using the back button in their browser to return to Page A.
mmoore thanks for the response. This option actually loads the page in the iframe instead of opening it in the same tab. Page B is loaded within the Page of the iframe.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.