Calling clearDirty to Clear the Changed Data Indicator

The clearDirty function sets the isDirty flag to FALSE. This function is called when a form is loaded, refreshed, or submitted. The clearDirty function is called from the loaded, update, and refresh functions in the Activity.js, ActivityType.js, Group.js, Location.js, and Person.js files (see PT Admin Application JavaScript Files). The call to clearDirty, which the following line of code illustrates, is identical for all forms and functions:

clearDirty () ;

The call to clearDirty is conditional; personGroup.htm contains the code that describes how the condition is satisfied. The following line of code calls clearDirty from the update function in the PersonGroup.js file:

if (submitOk) clearDirty();

The following code fragment shows the clearDirty function in the IsDirty.js file:

function clearDirty() {
   isDirty = false;
}