


JavaScript/jQuery, HTML, CSS to build Web IM remote instant chat communication program
This article mainly introduces how to build a BS Web chat application using JavaScript, jQuery, HTML, CSS, and the third-party chat JavaScript (jsjac) framework. This program can communicate and send messages to all applications connected to the Openfire server. If you want to run this program, you also need a chat server Openfire,
and a third-party library (JabberHTTPBind) that needs to use Http to communicate with Openfire.
JabberHTTPBind is the Http bind sending form of XMPP protocol communication provided by jabber. It can complete the establishment of long connection communication between WebBrowser and Openfire.
The main communication process is shown in the figure below:
User A sends a message to the Servlet container of JabberHTTPBind through the JavaScript jsjac.js library, and then the Servlet container of JabberHTTPBind will send an XML message of the XMPP protocol to Openfire. Openfire Server parses the message after receiving it, and then sends it to the specified user B. After JabberHTTPBind obtains the data sent by Openfire Server, it parses the message to find the specified user in the linked Session in the current Servlet container and then sends the data to user B.
The WebBrowser side uses the connection established by jsjac and JabberHTTPBind. All data must be parsed/converted by JabberHTTPBind and sent to Openfire.
First take a picture to see the effect, haha~ Here is the chat screen of users hoojo and girl. The two parties are chatting with each other...
You can send emoticons and change font styles (you can also see the other party's interface) Your font style), and the right side is the information to display/shrink details
Shrink details
Partial screenshot of the chat interface
User login and registration, sendTo indicates who you will send chat messages to after logging in, And create a chat window
After successful login, you can see your login status in the log console, or see your connection request status in the firebug console
Failed login
Only connecting, nothing more
After successfully logging in, you can send messages to the specified user, and set the new user you want to send messages to. Click the new Chat button to create a new conversation
If you When a new message comes, there will be a new message prompt in the title bar of the browser
If the windows of your current chat interface are closed, there will be a flashing message prompt icon in the lower right corner

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Notepad++7.3.1
Easy-to-use and free code editor
