Test for a dirty form (simulate enableModifiedFlag)


if (XSP._isDirty()){
	if (confirm ("Are you sure you want to navigate away from this page?" + "\n" + "\n" +
		"This document may contain unsaved changes." + "\n" + "\n" +
		"Press OK to continue, or Cancel to stay on the current page.")) {
		return true;
	} else {
		return false;
	}
} else {
	return true;
}
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...