Skip to content
Advertisement

Tag: chat

How can I make a simple chat/store messages in localhost?

I’m working on exercise, a simple chat/store messages, working on localhost, but it’s not working properly. The objective is to send user and message, and store the user and messages sent with a date. Like:(11:32 @USER: Hello world). This message data (with user,message and date) should be displayed on page, one after another. I’m doing this with no dependencies, but

Scroll to bottom of div?

I am creating a chat using Ajax requests and I’m trying to get messages div to scroll to the bottom without much luck. I am wrapping everything in this div: Is there a way to keep it scrolled to the bottom by default using JS? Is there a way to keep it scrolled to the bottom after an ajax request?

Advertisement