For some of you this question may seem to be stupid, but I don't think so...
So, basically what I want to achieve is to open new tab by javascropt in the same browser window, but it mustn't be opened by clicking on something. I've tryed several things...
window.open(url,"_blank") somehow doesn't work for google chrome, it opens whole new window of chrome...
then I tried something like this
`<a href="" target="_blank" id="link"></a>
<script type="text/javascript">
function OpenNewTab(link){
var a = $('a[target="_blank"]')[0];
a.setAttribute('href', link);
// document.getElementById("link").click();
// a.click();
}
</script>`
anyways if I comment out any of the lines, it still does the same, but if I change first line of code to this
`<a href="" target="_blank" id="link">Click Here</a>`
and click it, it of course works fine...
as a reminder, all this things apear to be working for me on firefox
Note: don't forget that all I want is to open tab after something happens in my code, not after user clicks on something