I have an 'Open' button that 'calculates' a link that should be opened in a new tab. I try to use:
window.open(url, '_blank');
But that opens a new window.
I also tried the following method:
<form id="oform" name="oform" action="" method="post" target="_blank">
</form>
...
document.getElementById("oform").action = url;
document.getElementById("oform").submit();
Still, a new window is opened, instead of a new tab.
When using simple <a href...>
with target='blank'
, the link is opened in a new tab.
Is there a solution?
<form target="_blank">
opens in a new tab when submitted, so it depends on the browser. – pimvdb