Savefunc
From SmartWiki
You can use savefunc to create a custom Browser Script that runs whenever a record is saved or submitted.
Example:
//this function runs when save is clicked. It runs the AddActivity script prior to the save/submit. function savefunc() { AddActivity() }