window.open on a-tag for new tab
<p>I am using this code to open a new tab:</p>

<pre><code>&lt;a href="javascript:window.open('https://example.com','_blank')"&gt;linktext&lt;/a&gt;
</code></pre>

<p>The new page is also loaded within a new tab however at the source page it is shown <code>[object]</code>instead of the link. What is wrong?</p>

<p>I do not want to use</p>

<pre><code>&lt;a href="https://example.com" target="_blank")"&gt;linktext&lt;/a&gt;
</code></pre>

<p>because I generate a list of links and the target page is called differently for each link. The most flexible way for me is to use the give Syntax.</p>

<p>EDIT:
This is the generated linklist:</p>

<pre><code>&lt;a href="javascript:window.open('https://example.com','_blank')"&gt;linktext 1&lt;/a&gt;
&lt;a href="javascript:jsfunc1(param1)"&gt;linktext 2&lt;/a&gt;
&lt;a href="javascript:jsfunc2(param2,param3)"&gt;linktext 3&lt;/a&gt;
</code></pre>

<p>The href attribute is generated. I get a from a table.</p>