Load chat data with Node.js and Html-ThrowExceptions

Exception or error:

I need to load the customer’s message data into the chat.
The code below is working correctly, but when I click on the image, I am redirected to the ‘responder.ejs’ view.
I need to load the data without redirecting to another page.
I’m not using socket.io
Very thanks!

enter image description here

<!DOCTYPE html>
<html lang="pt-br">
    <title>Título da página</title>
    <meta charset="utf-8">
     <link rel="stylesheet" type="text/css"   href="/css/styles.css">

   <div id="container">
            <input type="text" placeholder="search">

            <% if (players.length > 0) {%>
                <% players.forEach((player, index) => { %>
                <a href="/responder/<%= player.Codigo %>"><img src="/images/logow.png" width="55" height="55" alt=""></a>
                    <h2> <%= player.NomeCompleto %></h2>
                        <span class="status green"></span>
                        <%= player.Celular %> |<a href="/delete/<%= player.Codigo %>"> Deletar </a>|
                        <%= player.Mensagem %> ...
                <% }) %>
            <% } else { %>

            <% } %>
        // I NEED TO LOAD responder.ejs HERE

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *