Open URL in same window and in same tab
Solution 1:
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.
Solution 2:
Use this:
location.href = "http://example.com";