You need to use the name attribute:

window.open("https://www.youraddress.com","_self")

Edit: Url should be prepended with protocol. Without it tries to open relative url. Tested in Chrome 59, Firefox 54 and IE 11.

Answer from vdbuilder on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › API › Window › open
Window: open() method - Web APIs | MDN
The open() method of the Window interface loads a specified resource into a new or existing browsing context (that is, a tab, a window, or an iframe) under a specified name.
Discussions

Opening the same Tab if its already opened by clicking the same link | OutSystems
Opening the same Tab if its already opened by clicking the same link More on outsystems.com
🌐 outsystems.com
July 12, 2021
How to make links open in same tab? - Google Chrome Community
Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Terms of Service · Submit feedback · Send feedback on More on support.google.com
🌐 support.google.com
October 19, 2019
How can I make links open in the same window? - Sites Community
Skip to main content · Sites Help · Sign in · Google Help · Help Center · Community · Sites · Terms of Service · Submit feedback · Send feedback on More on support.google.com
🌐 support.google.com
Open a URL in a new tab (and not a new window)
The question is specifically about opening in a new tab even if the preferences are for a new window. 2020-02-02T20:48:01.467Z+00:00 ... To open a new tab and stay on the same location, you can open the current page in the new tab, and redirect the old tab to the new URL. More on stackoverflow.com
🌐 stackoverflow.com
🌐
W3Schools
w3schools.com › jsref › met_win_open.asp
Window open() Method
The open() method opens a new browser window, or a new tab, depending on your browser settings and the parameter values. The close() method. window.open(URL, name, specs, replace) Open an about:blank page in a new window/tab: var myWindow = ...
🌐
GeeksforGeeks
geeksforgeeks.org › html › how-to-open-url-in-same-window-and-same-tab-using-javascript
How to open URL in same window and same tab using JavaScript ? - GeeksforGeeks
July 24, 2025 - The "_self" parameter specifies that the URL should be loaded in the current window. Example: In this example, we have used the window.open() method to open the "geeksforgeeks.org" URL in the same window and in the same tab.
🌐
Sololearn
sololearn.com › en › Discuss › 346470 › how-to-open-url-in-same-window-and-in-same-tab-
How To Open URL in same window and in same tab ??? | Sololearn: Learn to code for FREE!
If you want to do this in HTML: <a href = "page.html" target = "_self"> </a> Else, use Javascript: window.open('page.html', '_self'); Bye. :) ... target=_blank is used to open link in new tab, what if we remove target attribute, won't that help in html, and In JavaScript by default would be different like opening in new tab .....
🌐
RNT Lab
rntlab.com › question › html-open-url-in-same-window-and-in-same-tab
HTML – Open URL in same window and in same tab
"{window.open('/serverIndex', '_ self')}" "{location.href ='/serverIndex'}" "{window.location.replace('/serverIndex'}" "{window.location.href = '/serverIndex'}" No one worked for me. ... Which web browser are you using? One of those examples should work, because it’s the official API to open in the same tab…
Find elsewhere
🌐
CodexWorld
codexworld.com › home › how to guides › how to open url in same window and tab using javascript
How to Open URL in Same Window and Tab using JavaScript - CodexWorld
April 15, 2023 - The JavaScript window.open() method allows you to open URL in the browser tab or window. You can use _self value in the second parameter of the window.open() method to open the URL in the same tab and in the same window with JavaScript.
🌐
Kevincox
kevincox.ca › 2023 › 04 › 24 › browser-link-open-newwindow
Should Links Open in the Same Tab or a New One? - Kevin Cox
April 24, 2023 - Open “new window” links in a new tab of the current window. Personally I set it to 1 to make all links open in the same window. Overall this works well and makes the web more predictable. However, it can cause some site breakage.
🌐
Mycode
mycode.blog › lakshmi › open-linkurl-same-tabwindow-or-new-tab-html-js
Open Link/URL in Same Tab/Window or New Tab in HTML & JS | mycode.blog
October 30, 2023 - In JavaScript, if you want to open a link in the same tab or window, you can do so by setting window.location to the new URL, effectively replacing the current page. On the other hand, to open a link in a new tab, you can utilize the window.open() ...
🌐
Western Washington University
marcom.wwu.edu › accessibility › guide › links-should-open-same-tabwindow
Links should open in the same tab/window | University Communications and Marketing | Western Washington University
Links that are set to open in new tabs/windows have no override for this behavior, so users are forced into a new tab/window whether they prefer that behavior or not.
🌐
UsefulAngle
usefulangle.com › post › 337 › html-open-links-in-same-tab
Open Links in a New Tab, Or Re-Use Already Existing Tab
November 27, 2020 - This behavior is beneficial in the case where we want to limit the number of new tabs created by the page. This can be achieved in HTML by setting the same name for the target attribute for all the given links. The name can be anything as per wish. <!-- same target attribute --> <a href="https://google.com" target="child">Link 1</a> <a href="https://bing.com" target="child">Link 2</a> <a href="https://msn.com" target="child">Link 3</a> If opening the links with Javascript open() method, the same window name needs to be provided for the given set of links.
🌐
Google Support
support.google.com › chrome › thread › 17211390 › how-to-make-links-open-in-same-tab
How to make links open in same tab? - Google Chrome Community
October 19, 2019 - Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Terms of Service · Submit feedback · Send feedback on
🌐
Google Support
support.google.com › sites › thread › 175683457 › how-can-i-make-links-open-in-the-same-window
How can I make links open in the same window? - Sites Community
Skip to main content · Sites Help · Sign in · Google Help · Help Center · Community · Sites · Terms of Service · Submit feedback · Send feedback on
🌐
Spiceworks
community.spiceworks.com › programming & development
How to Open a New Webpage in Same Tab - Programming & Development - Spiceworks Community
November 5, 2014 - From my default.aspx page, I need to click on a button and open a different webpage, in the same tab. How is this done? There are 5 buttons and they are in a table. Each button when clicked should open a different aspx webpage. The OnClientClick for each button has the following: window.open(...
🌐
Google Support
support.google.com › chrome › thread › 3520860 › how-do-i-set-chrome-to-open-links-in-a-new-tab-on-the-same-browser-window
how do i set chrome to open links in a new tab on the same browser window? - Google Chrome Community
Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Terms of Service · Submit feedback · Send feedback on
🌐
Microsoft Fabric Community
community.fabric.microsoft.com › t5 › Desktop › Opening-a-link-in-the-same-browser-tab › td-p › 2028791
Solved: Opening a link in the same browser tab - Microsoft Fabric Community
November 2, 2023 - Does any of you know if there is a way to open a link in the same browser tab as the report you are executing? I've tried 3 different ways and none worked: 1 - Create a button with a Web URL action -> Opens the link in a new tab; 2 - Use the HTML Content Visual with this HTML : <a target="_self" href="http://address" >Text</a> -> Opens the link in a new tab; 3 - Use the HTML Content Visual with Javascript window.open("http://address","_self") -> Doesn't work at all; Any suggestions?