Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there any way to trigger the code behind enableModifiedFlag from CCSJ or SSJS?
    primarykey
    data
    text
    <p>If I set enableModifiedFlag property to true on my Custom Control; I see the following code at the bottom of generated Page source.</p> <p>Everything works fine when user moves away from changed page; they get the alert message of "Unsaved Data"</p> <pre><code>&lt;script type="text/javascript"&gt; function view__id1__id2__id95__id98__id105_clientSide_onclick(thisEvent) { return validateForm(); } XSP.attachDirtyUnloadListener("This document may contain unsaved changes."); XSP.addOnLoad(function() { XSP.attachEvent("view:_id1:saveActionEventHandler", "view:_id1", "ondirtysave", null, true, 2); XSP.attachEvent("view:_id1:_id2:_id95:_id98:_id105", "view:_id1:_id2:_id95:_id98:link1", "onclick", view__id1__id2__id95__id98__id105_clientSide_onclick, true, 2); XSP.attachEvent("view:_id1:_id2:_id95:_id98:_id106", "view:_id1:_id2:_id95:_id98:link2", "onclick", null, true, 2); XSP.attachDirtyListener("view:_id1:_id2:_id95:_id98:businessName11"); XSP.attachDirtyListener("view:_id1:_id2:_id95:_id98:businessName21"); XSP.attachDirtyListener("view:_id1:_id2:_id95:_id98:address11"); XSP.attachDirtyListener("view:_id1:_id2:_id95:_id98:address21"); XSP.attachDirtyListener("view:_id1:_id2:_id95:_id98:city1"); XSP.attachDirtyListener("view:_id1:_id2:_id95:_id98:cbState"); XSP.attachDirtyListener("view:_id1:_id2:_id95:_id98:zipCode1"); XSP.attachDirtyListener("view:_id1:_id2:_id95:_id98:phoneNumber1"); }); &lt;/script&gt; </code></pre> <p>I have an Exit button with SSJS that unlocks the document if its locked and makes a context.redirectToPage. The problem is that this button is not triggering the code behind the enableModifiedFlag logic so users leave the page without being prompted if they want to leave with unsaved data.</p> <p>Is there any way to trigger code behind enableModifiedFlag from this button using CCSJ or SSJS?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload