Click or drag to resize

cancel Property

Gets or sets a value indicating whether the event should be canceled.

Syntax
JavaScript
this.cancel;

Property Value

Type: Boolean

true if the event should be canceled; otherwise, false.

Remarks

This property should be set to true in an event handler.

Examples
The following example uses CancelEventArgs to handle the "saving" event of the PdfWebControlApi Class.
JavaScript
//declare event handler function (which accepts an object of type CancelEventArgs as an argument)
function savingHandler(evt)
{
    //cancel saving
    evt.cancel = true;
}

//get API class
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance

//attach event handler to saving event
myApi.addEventListener("saving", savingHandler);
See Also