Click here to Skip to main content
14,732,707 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to create a mobile-friendly pop-up that allows people to click on a link in a Qualtrics survey that opens a new window that takes them to an external site. Once they are on the external site, they are able to return to the original site. What would be the best way to achieve this? I've looked into modal iFrames and those are problematic because there are some external sites that I want to feature in pop-up windows that do not allow themselves to be embedded into iFrames. I'm hoping that I can add some sort of banner that allows a user to close the pop-up window to take them back to the original site.

What I have tried:

function popup() {
    var win ="", "Page Title", "toolbar=no, location=no");
    var win_timer = setInterval(function() {   
      if(win.closed) {
      }, 100); 
<a href="javascript:void(0)" onclick="popup()">Open Me</a>
Updated 9-Sep-20 23:31pm

1 solution

If a site doesn't allow itself to be embedded in an <iframe>, then there's no way you can add a "decorator" to it to take you back to your site.

The closest you can get is to open the site in a new tab. When the user closes that tab, your site will still be open in the other tab.
<a href="https://......." target="_blank">Open Me</a>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900