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

185
Vistas
Ajax async call for new window

today I am stacked with some question about async work of jquery ajax.I am pretty new to js and especially for jquery.

After click on button new tab opened and filled with pretty long request(a lot of data returned) and freeze other part of site (tab wi button) until request is done. Is there any possibilitty to make it work async, so my old tab will work while request computating?

Current js code for open new window

window.open(request, '_blank')

Which one obviously not async

May be something like

Var O = window.open() ; O. Ajax(blablabla)

UPD:

I solved problem by creating new element with rel="norefferer" and imitate click on that element, so new tab will open in new process and don't block main tab

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

AJAX is async (it literally means "asynchronous JavaScript and XML").

You just need to use it properly, as follow :

$.ajax({
    url: "https://www.example.com",
    "success": function(result) {
        // This part will be called after the ajax request was successful
        /* 
        insert your code here, 
        but be aware that, as CBroe noted in the comments, 
        window.open() could be blocked by modern browser 
        */
    }
 });

Read the jquery documentation on AJAX for more info.

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