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.
🌐
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…
🌐
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.
Find elsewhere
🌐
Kevincox
kevincox.ca › 2023 › 04 › 24 › browser-link-open-newwindow
Should Links Open in the Same Tab or a New One? - Kevin Cox
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() ...
🌐
UsefulAngle
usefulangle.com › post › 337 › html-open-links-in-same-tab
Open Links in a New Tab, Or Re-Use Already Existing Tab
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
Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Terms of Service · Submit feedback · Send feedback on
🌐
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.
🌐
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(...
🌐
Windows 10 Forums
tenforums.com › browsers-email › 131605-how-force-open-link-same-tab-google-chrome.html
How To Force Open Link In Same Tab In Google Chrome - Windows 10 Help Forums
Both links work as intended, (same tab), for me, with the extension, single left click... The second link is here: For that link the only way to open in the same window is via drag 'n' drop the link into the same window or else use the context menu to open the link in the same window.
🌐
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?