How to show table results always at the top?

Asked

Viewed 54 times

0

I’m setting up a chat and it occurred that the messages are appearing at the bottom of the table, from the bottom up. That is, I have to scroll down to see the new messages. And I would like to see the messages at the top.

I’ve taken some chat examples and the message always appears on top, but I can’t remember how it’s done.

Someone can help with that?

  • And how do you insert the message into the conversation? A new div with pure Javascript or maybe framework? Or load the whole page again? How does the client browser know to load new messages? Periodically checks?

  • Long Polling is responsible for the dynamic loading of conversations. The message is inserted via pure javascript same.

No answers

Browser other questions tagged

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