You can use savefunc to create a custom Browser Script that runs whenever a record is saved or submitted.
Cateogry:JavaScript