Hi, I'm trying to achieve a notification feature which you see on facebook, myspace and so on. Here the trick that I use: I've pulled a number of data that a user has not been read (where active ='0') from a database to display on a notification icon on the menubar -- the exact notification icon you will see on facebook and myspace -- says 2 unread messages in bright red. As the user click on the notification button to open up a dropdown menu and read their unread messages I process the script and update the active = '0' to active = '1' and refresh the page. The problem is when the page is refreshed, the dropdown menu and the notification both disappeared. How do I remove only that number in red and keep the dropdown menu open, I know that both facebook and myspace didn't even refresh a page. In this case, I don't even know whether I use javascript or ajax. I've stolen (borrowed) the feature from twitter. Hope I explain what I'm trying to do clearly and thanks for your help
Look at the code to see which one you're using. It sounds as if you're just reloading the page. That sets the page to what it was the first time, without any of the changes you've made. You need to use AJAX to only "refresh" the elements you want changed.
you must use server side language and insert that in db for that type of notification because you can't show this after page refresh with ajax.