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
addEventListener method. An example code:const form = document.getElementById('myForm');
form.addEventListener('submit', () => {
/*You can write any code here*/
});
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?