Help! How to close the WIX site (window) automatically or open URL in same window

Hi all,

I am a beginner at programming.

I was wondering if somebody could help me achieve the following.

On my WIX website, I have an embedded website, which is a survey (made in Qualtrics). After finishing the survey, I want my participants to be redirected to another webpage. To achieve this, I added a hyperlink in the last page of the embedded survey. When participants click on this hyperlink, the page is opened in another tab. All seems to work well.

However, I would very much like the second survey to be opened in the SAME window, not a new tab (which it currently does). Unfortunately, I have not yet worked out how to do this.

What I tried (but did not work):

  • add " target =_blank" in the hyperlink. This will open the new survey IN the embedded space on my WIX site, not on the same window.
  • change it into a pop-up window. This will simply not load on my WIX site (it does work without WIX).

Any suggestions on how to solve this are welcome!

I was wondering if I could for example add Javascript code to my WIX page that tells it to close itself when the hyperlink (inside my embedded Qualtrics website) is clicked? Hence, the website opens in a new tab, but the current tab is automatically closed as well, leaving only one tab open?

Or, would it be possible to add code so that when participants click on the hyperlink, it is opened in the same window , not a new tab or within the embedded frame?

Thank you in advance!

Why not just simply remove the following part of your code…

"target =_blank" 

Than you would have just this one…

$w("#yourButtonIDhere").link="your URL here";

This would set a link to your button, which should normaly open in the same window.

Thank you for your reply. I am however, unsure how to implement your suggestion. Below, you find the HTML of the hyperlink (from Qualtrics). I changed the link to myURLhere as I cannot share links.

CLICK HERE

Do you suggest removing the tager=_blank part here?

@naomivanbergen
In your case…try the following…

@russian-dima Thank you again for your help!

I tried all of the above, unfortunately it does not seem to work.

_blank opens in a new tab
_ self opens within the embedded frame
_parent opens within the embedded frame
_top does not open at all (I see that the webiste tries to load it, but nothing opens)

Could it be something within the WIX settings that prevents _top to open?

@naomivanbergen
Can you make a screenshot of what you have in front of your eyes → so i can see the same SETUP ?