title: Open multiple tabs with javascript
body: <p>I have a javascript routine that gets a list of IDs and I want to open a browser tab for each ID.  Here's what I have right now -- and it opens the first tab but not any other.  Can someone point me in the right direction?</p>
  <pre><code>function launch() {
          var data = {5, 8, 9};
          if (data.length &gt; 0) {
  
              let url = &quot;/Controller/Action&quot;;
              data.forEach(function (entry) {
                  
                  let link = document.createElement('a');
                  link.href = url + &quot;?VisitID=&quot; + entry;
                  link.target = '_blank';
                  link.click();
                  //setTimeout(() =&gt; { console.log(&quot;wait&quot;); }, 1000);
              });
          }
          else {
              alert(&quot;You must select at least one row before launching&quot;);
          }
      }
  </code></pre>