How do I refresh page and keep a dropdown menu open

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

it sounds like you are going to have to use ajax, so you won’t need to have the page refreshed,
and javascript should offer a solution to the dropdown menu problem,
or maybe instead of using a dropdown menu you could try and build a similar control using a div as your container.