How to handle JavaScript data exchange events? (ASP.NET Edition)
Last modified:
Please review the "Client event handle" demo project included in the installation package to illustrate this functionality.
Below is the sample code from this demo:
<script type="text/javascript" language="javascript"> OnApplicationReady(function () { $(QB.Web.Application).bind(QB.Web.ApplicationEvents.beforeDataExchange, beforeDataExchange); $(QB.Web.Application).bind(QB.Web.ApplicationEvents.afterDataExchange, afterDataExchange); }); function beforeDataExchange(sender, e) { alert("Before data exchange"); } function afterDataExchange(sender, e) { console.log(sender, e); alert("After data exchange"); if (e.SQL) alert("New SQL:" + e.SQL); } </script>