Jump to content
rootKID

update page when anything new...

Recommended Posts

Hello W3S! Yet again here with a question.

 

I was wondering if it would be possible to run a script/javascript/jQuery that will update a page/element of a page (( IF )) there is any new item in the database?

 

I have seen this in chats online over the internet. The chat wont change what is already there, and if there is being written anything to the database, the new item/chat message in the database will automaticly (( Fade )) into the chat via jQuery.

 

Is this possible? If so, where to look? Possible to guide me to a place where i can find some details? Would be much appreciated! :)

 

Thanks in advance W3S! :D

Share this post


Link to post
Share on other sites

I suppose you could check for a new message, every so many seconds to make jQuery ajax request which checks database for any new records by referencing timestamp or record count, then append new record to current.

Share this post


Link to post
Share on other sites

You could look into using WebSockets

Share this post


Link to post
Share on other sites

Hmm... thanks for the answers guys, will check it out ^^...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×