i am working on IOM (Inter office memorandum )
i saved differnt record in database and i can also fetch that data on my php page.
in my prog let suppose user 1 send iom to user 2. this record is saved in database and on the other side user 2 can view that also...

what i want now is that when user2 recieve new IOM there should be some notification on its page that shows it has got a new message.

i dont know how to do it.... its not like sending an email.... its simply done through database and php pages are linked together.

plz any one have an idea how to do this?


8 Years
Discussion Span
Last Post by sergb

Each page can periodically poll the server/database for new messages. You can use AJAX calls for that. When a new message is detected, you can use javascript to display the "new message" notification to the user.

When a user opens the page, the page should remember who opened it. Say it was user2. Then the page can send an AJAX request to a server-side script every N seconds passing it the name of the user (user2 in this case). The server-side script would check the database for new messages for user2 and return, for example, the number of new messages. The javascript code on the page would examine this number, and if it is greater then zero--display the "new message" notification.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.