Calling a JS file function on the front end when receiving a response from the server

Asked

Viewed 13 times

0

I am using bootstrap Alert to send a message to the user, however, I would like to change the way messages are presented to the user, actually I do this way:

<!--Mensagem de Sucesso-->
<% if( typeof sucesso != 'undefined') { %>         
<div id="categoriaAviso" class="alert alert-success alert-dismissible fade show" role="alert">
 <Strong>Sucesso: </Strong><%= locals.sucesso%>
  <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  <span aria-hidden="true">&times;</span>
  </button>
</div>                
<% } %>

however, instead of using Alert, I would like to use a function that is in my JS file, which uses sweetAlert2, as I can call a function of my JS file?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.