New message in chat alert!

I’m testing in this chat
but this is my problem, if you scroll the page… and a new message is loaded, you will never know until you scroll down to bottom… there is a way of notify the person?

I’m loading all the messages in a simple .txt file and loading the txt… with php