I don't know if I completely understand what you're asking for. But as I see it, what you're asking for is a way to update a web page, without refreshing (and without knowing when to refresh), that means using Push. You can achieve that in so many different ways. I'm just going to outline how I would do it:
1 - Implement a Comet Server. I would suggest Atmosphere
2 - In that server implement a @Broadcast method.
3 - In the Comet Server also implement a thread that just checks for updates on the database and when found, invoke the broadcast method.
4 - Finally use some kind of subscribe method to the Comet Server. I would suggest using the JQuery library provided by Atmosphere.
As I said, this is just an outline and there are many options to achieve what you need (or what I think you need), this is just one.