php - How to get the count of mails in inbox beside link "inbox" just as we have in GMAIL? -


i have document management system, has similar left panel have in our gmail need display counts of items avaialble in different links of left panel till seen, of them seen opening detail page count in left panel decrease.

it sounds you'll need use javascript this. here's quick example whipped up: http://jsfiddle.net/fmyks/

when item opened, calculates number of visible items still marked 'unread'. you'll need more work though, since you'll want note item read in database. instead of counting number of elements class 'unread', send ajax request server id of current document opening. in server-side script, mark item read in database , have reply new number of unread docs. take value , insert html. (note: if you're using ajax fetch information document when clicked, can add logic same ajax request)

hope helps!


Comments

Popular posts from this blog

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

jQuery clickable div with working mailto link inside -