Utils.js

Test Results
getContext Test: Running
Modal Autofocus Test: Running
Collapse Autofocus Test: Running
Modal Show on Error Test: Running
getContext
The getContext function is a handy little function to parse the location object and get the server context.
JavaScript
Modal Autofocus
Show Modal
HTML
Collapse Autofocus
HTML
Modal Show on Error
Mock Page Load
HTML
dirtyCheck
The dirtyCheck function initializes a collection of event listeners based on the beforeunload event to prevent users from leaving the page. While it is considered unreliable (see usage notes), it works for our needs.
JavaScript