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

204
Views
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 answers
Answer question

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 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!