Hi all,
I'm pretty new to jQuery, and have no idea where to start with this issue that I am having.
What I am trying to do is this:
On my website, members are allowed to send messages to each other.
What I would like to happen is that when the message is successfully sent, I want the recipient to get a little popup notification that x-member has just sent them an email.
Now, I have the messaging system in place, and working properly (the messaging script is written in PHP, and the messages are stored in MySQL). So all that is left to do is for me to figure out how to notify the member of the new message.
Also, and this part is important, I only want the notification to appear one time (meaning that if the member navigates to another page, the alert should not reappear).
I know how to do this in PHP, but I would rather not do it that way for a couple reasons:
1: I don't want to require the page to be refreshed in order for the new message alert to appear
2. I just want to start learning jQuery!
Can anyone give me ideas on where to start, or maybe code samples that I could study?
I have been looking at the jQuery docs, and trying to wrap my head around just the flow of this program.
Does this sound correct, or is my thought process off?
Member sends an email >>> The message is validated and sent in PHP >>> if the message is successfully sent, insert the message into database >>> have an AJAX script that checks the database for new messages every x-amount of seconds >>> if a new message was found for the member, trigger an alert of some type