In order to assist, you'll need to share your code.
Also, keep in mind that opening in new/current tab/window is often dependent on the browser's settings and not possible to control via code.
How can I share the code with you?
You can post the URL of your site. Only authorized Wix personnel can get access to your site in the editor.
Keep in mind that the browser settings might not let you do this is in code.