onConnectionChange

Arguments

eobject

An object passed to the event that contains the following properties:

onlineBoolean

Indicates whether or not the device has a connection to the internet.

Description

Fires before when the internet connection is lost or recovered. The 'online' parameter is true/false.

Discussion

A common use case for the onConnectionChange event is to dynamically display a "sync" button if connection is available. E.g.

Example

if (e.online) {
    {dialog.object}.setControlDisplay("SYNC_BUTTON",true,"v");
} else {
    {dialog.object}.setControlDisplay("SYNC_BUTTON",false,"v");
}

See Also