RAD PDF Documentation
addEventListener Method
See Also  Send Feedback

Add event listeners to a PdfWebControlApi Class instance which raises when a specific PdfWebControl client-side event type is raised.

Syntax

CopyJavaScript
function addEventListener(type, highlight);

Parameters

type

Type: String

The type of listener. See PdfWebControlApi Events for list of all events.

listener

Type: Function

The function to call when this event is raised.

Return Value

Type: Boolean

Returns true if successful.

Returns false if fails.

Remarks

Some types of events will return parameters indicating more about their state.

The scope of all returned events is the PdfWebControlApi Class which raised it. This means that this.Key (or any other method) can be called on the this object to operate on this same PdfWebControl.

Examples

CopyJavaScript
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance
myApi.addEventListener("saveStart", function(){window.alert("We are going to cancel this save for " + this.Key() + "!"); return false;}}))

See Also

Other Resources

PdfWebControlApi Methods
PdfWebControlApi Events

Send comments on this topic to sales@ctdeveloping.com

Copyright CTdeveloping, LLC