If you change values of a field via scriptings it will not execute specific events like enter, click, exit or change. If a script resides in one of those events, you'll need to trigger it programically too.
// Code to execute the exit event of Textfield1.
Textfield1.execEvent("exit");