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

96
Vistas
How to display messages before executing

In my javascript project, there are some functions, which take a while to run. I want to display "something" to the user, that his/hers process has already started.

When I try the usual suspects like showing elements (e.g. div panels), those elements get only rendered, after everything is finished.

The only element, that would show up before the function is executed, is an "alert()".

e.g.

document.getElementById("button").addEventListener("click", function (){
        
        show_message("starting");

        this_function_takes_forever();

        show_message("done");
        
    });

in the code above, after the user clicked the "button", there would be a pause aka "freezing". After that only the message "done" would pop up.

about 4 years ago · Juan Pablo Isaza
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