How to open a new tab within window.open window - Javascript
I have below code for opening a new window.
window.open("https://www.w3schools.com", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");
It opens new window as expected. If there is a link button within this new window, once user clicks on it, how to open it as new tab within the same new window instead of opening another new window in MS Edge.
Your help will be greatly appreciated. Thank you in advance!
Solution 1:
I agree with serg06, when you use the provided code to open new window, you will find that it is just a popup
, not a tab
window. It doesn't have page navigation tool(go forward or backward), only when you convert it to a tab can you achieve your requirement. like this:
Otherwise, if you use target='_blank'
, you can only open a new tab in the parent page.