XForms/Warn on Navigate Away

Sample Program
= Preventing Form Data Loss When User Navigate Away from Unsaved Data =

Add this code to global.js

Mozilla Page

IE Manual

Discussion
Use the xf:load action in combination with an xforms-value-changed event to call a "dirty" function containing setBunload(true).

Likewise, use the load action within the submission to call a "clean" function containing "setBunload(false)".