Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

198
Views
How to open several urls with window.open at the same time?

In my app (with alpinejs 3 ) I have texarea with several urls entered(any url on any new line) and I try to open any url in new tab of my browser:

        let arr = content_textarea.split( String.fromCharCode(10) );
        let l= arr.length

        // let windowFeatures = "left=100,top=100,width=320,height=320";

        for (let i= 0; i< l; i++) {
            console.log('arr[i]::')
            console.log(arr[i])
        //  window.open(arr[i], '_blank', windowFeatures );  // Uncommenting this line did not
            window.open(arr[i], '_blank' );
            // delay(1000); // Uncommenting this line did not
            console.log('NEXT::')

        }

But only 1st link is opened actually. In browsers console I see output of all lines. If there is a way to OPEN ANY url in separate browsers tab ?

I tried Google Chrome Version 100.0.4896.75 under kubuntu 20.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try this:

let arr = content_textarea.split( String.fromCharCode(10) );
let l= arr.length

for (let i= 0; i< l; i++) {
    window.open(arr[i], i);
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!