how to add target blank to an href.location hyperlink : <p>I'm trying to get a link in javascript to open a url in a new tab. I've found a number of posts for target="blank" using attribute and a couple other ways but can't seem to get it to work. Basically, if v_virt = "invoices" I just need the url to open in a new tab. Does anyone know the proper syntax? </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>if(v_virt=="invoices"){
location.href=('https://www.example.com/invoices/invoice?ProjectID=[@field:ProjectID]&amp;InvoiceID=[@field:InvoiceID]', '_blank');
}</code></pre>
</div>
</div>
</p>
