Ok, so you know when you’re answering a question and are in the middle of typing it, and someone else posts an answer to your question and you get a little popup that says there is a new answer to the question? My question is how do you do that? I think I have the basic concept down… A question is answered, added to the database. The page your on keeps checking the database for new answers, and if there is something new displays a popup. (I’m not sure if that’s how it’s done, but just and idea) Anyway, I’m trying to create an application with similar functionality to that popup using php, and jQuery / Ajax / something else? I have a page that will be on the screen and will display information from the database. What I need: to figure out how to get that popup to display only when there is new content added to the database.
Thanks for the help!
I should also add… if anyone has any tutorials, or code snippets to share about the ajax / jquery integration with sql that’d be great. I’m pretty decent at PHP but totally new to ajax and jquery :-/
when you first load the question page, also read the number of answers.
Now poll the server with ajax requests every few seconds/minutes that return the number of answers..
If the number of answers is greater than the number when you first loaded the question then show the message that additional answers have been posted..