Stop it through WHAT command?
And I doubt very much that anybody has spare code sitting around that does exactly this.
But the principles are simple enough.
Do you need to use AJAX to tell the server to update the database? Or will you submit a <form> on the page to do so?
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.