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

205
Vistas
Nodejs countdown when left will do some function

I have a web Application and i wanna to add a function. the function as a table will show inside it some result if the user post a request. and if user not post any thing will show different result when the time left. I work with nodeJs and ejs as view engine. and mongoose as database

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

0

  1. I think you want a function to run, if user submits a form. In this case you can use addEventListener method. An example code:
const form  = document.getElementById('myForm');

form.addEventListener('submit', () => {
    /*You can write any code here*/
});
  1. If you want to see a successful post request, (in other words if the visitor has sent data to node.js and if node.js successfully saved this data inside database), then you can set res.status(201) in your node.js file. And then detect 201 from your ejs file and then run your method. You can check this question, if you want a solution with 201: How to get 201 status when uploading a file?
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