ZenMethod in onunloadHandler
I want to call ZenMethod when page is closing. Is it possible?
I tried
{
zenPage.SomeZenMethod();
}
Method SomeZenMethod() [ ZenMethod ]
{
// to do some work
}
but it is not working
Discussion (1)0
Comments
Synchronous and Asynchronous Methods
-
ClientMethod onunloadHandler() [ Language = javascript ] { this.SomeZenMethod(); } ClassMethod SomeZenMethod() As %Status [ ZenMethod ] { // to do some work quit $$$OK } -
ClientMethod onunloadHandler() [ Language = javascript ] { var old = zenSynchronousMode; zenSynchronousMode = true; this.SomeZenMethod(); zenSynchronousMode = old; } ClassMethod SomeZenMethod() [ ZenMethod ] { // to do some work }