Click or drag to resize
AceoffixCtrlJsFunction_BeforeDocumentClosed Property
Sets a JavaScript function for BeforeDocumentClosed event.

Namespace: Aceoffix
Assembly: Aceoffix (in Aceoffix.dll) Version: 5.0.0.1
Syntax
public string JsFunction_BeforeDocumentClosed { get; set; }

Property Value

Type: String
The property has no default value.
Remarks

This event is triggered at the client-side before the document is closed.

If you want to capture this event, You should define a JavaScript function in the aspx file of current page.

In the JavaScript function, you can return false to prevent from closing the document.

But returning false can not prevent web browser from being closed. If you want to check whether current document is modified and notice user to save document before close page, we recommend you write code into onunload event of the page.

Examples

The following code example shows how to use the JsFunction_BeforeDocumentClosed property.

AceoffixCtrl1.JsFunction_BeforeDocumentClosed = "BeforeDocumentClosed()";

And then, you should define the BeforeDocumentClosed() JavaScript function in the aspx file of current page.

JavaScript
<script language="javascript" type="text/javascript">
    function BeforeDocumentClosed() {
        // Add your code here.
    }
</script>
See Also