jeudi 26 août 2021

Ajax Post request refresh page after success

I built a small chat app using Laravel. Messages are sent and received perfectly.

I have made 2 functions for chat. One is to fetch chat (update the chat div) and the other saves chat when the 'send' button is clicked. The first function will be called when you load the page and send the message.

The problem occurs when I am calling the saveChat function; it refreshes the page after I click the send button.

my view >> chat will append in chat-data div and a input and a button is added to write and send meessage

Load the chat

save chatcontroller function to save chat



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3BhUfnA
via IFTTT

Aucun commentaire:

Enregistrer un commentaire