I’ve been trying to get this right but any of the code i try works.. i looked here and i couldn’t find an useful answer.
I have this code on the “onclick” event of a button:
function myFunction(){
window.open("mypage.html","_self");
}
that is supposed to open the url in the same tab, but it doesn’t do anything. On the other hand if i take out the “_self” argument, it does work but it opens the url in another tab which is exactly what i don’t want.
help please?..
Use this instead:
This will replace the current document in the current window/tab with a new document loaded from that URL.