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

354
Views
In node.js , after post a form, how to alert a success message then jump to the main page?

This is an ejs file, I just write like this, and I just want to have an alert and then jump to another page. But now the question is in the alert, the mes and 'success are separated into 2 lines, and can not jump to the homepage.

<div id='Message'>
<%= message%>
</div>

<script>
    showAlert = function(mes, req, res) {
      alert(mes+ 'success');
      return res.views('Event/home');
    }

    var Message = document.getElementById("Message");
    var me=Message.innerHTML; 
    showAlert(me);
    </script>
about 4 years ago · Juan Pablo Isaza
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!