Using IsDirty.js to Track Changed Data
All PT application forms use the functions in the IsDirty.js file to track content changes, ensuring that users do not inadvertently leave forms without saving the changes they've made. These functions are called from *.js JavaScript files or assigned to events on elements in the localized HTML pages.
IsDirty.js contains the following functions:
- setDirty sets the value of the isDirty variable to TRUE, indicating that the value of an element on the form has changed.
- clearDirty sets the value of isDirty to FALSE, indicating that the form no longer contains modified elements.
- checkDirty checks the value of isDirty; if the value is TRUE, checkDirty returns the L_PageIsDirty variable containing the localized message text.