Click or drag to resize

mode Property

Gets the mode selected.

Syntax
JavaScript
this.mode;

Property Value

Type: Mode Enumeration

The mode selected at the time that the "modeChanged" event is raised.

Remarks

This property is read-only and should not be set to.

Examples
The following example uses the ModeChangedEventArgs Class to handle the "modeChanged" event of the PdfWebControlApi Class.
JavaScript
//declare event handler function (which accepts an object of type ModeChangedEventArgs as an argument)
function modeChangedHandler(evt)
{
    //show current mode
    window.alert("Mode Selected: " + evt.mode);
}

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

//attach event handler to objectAdded event
myApi.addEventListener("modeChanged", modeChangedHandler);
See Also