Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

197
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda