U
U
UNy2018-06-17 23:51:53
JavaScript
UNy, 2018-06-17 23:51:53

Creating a consultant for the site?

Tell me how to implement a similar window for the site:
5b26c97022494291617207.png
I need to enter some keyword, the data is sent to the server and a selection is made there, and the response from the server appears in the same window. You need to do at least something simple)), tell me how to do it all, or maybe there are ready-made examples?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexey Tipa, 2018-06-17
@KayzerSoze

If we omit all the details about the chat window, then only the form input and the send button remain. This is about such a "simple" you ask?

T
ThunderCat, 2018-06-17
@ThunderCat

https://www.jivosite.ru/
or see an overview of similar

A
Artem Spiridonov, 2018-06-18
@customtema

phpfaq.ru/newbie/na_tanke

M
mletov, 2018-06-18
@mletov

The main difficulty in creating such a chat is how to notify the interlocutor of a new message.
Actually, there are 2 ways:
1) Clumsy and lazy. Through SetInterval(), send requests to the database via ajax and see if there are new records in it.
2) Beautiful and correct. I wrote such a chat, but since the stack was ASP.NET, I used SignalR (dotnet wrapper for WebSocket). But since you have a different stack, then read about WebSocket and the corresponding libraries for working with it on the server and on the client.
https://bablofil.ru/nodejs-websocket-chat/
How to write a chat on websocket'ax (javascript)?
https://medv.io/create-chat-on-php/
Everything else is pretty primitive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question