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

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.