IBM Worklight v5.0.5 > API reference > IBM Worklight client-side API > JavaScript client-side API

WL.App.overrideBackButton


Override the default behavior of the Back button on Android, Windows Phone 7, and Windows Phone 8 devices, calling the callback function whenever Back is pressed.

Applies to Android, Windows Phone 7, and Windows Phone 8 only.

Parameter Description
callback Function. The function that is called when Back is pressed.
WL.App.overrideBackButton(backFunc);
function backFunc()
{
    alert('you hit the back key!');
}


Parent JavaScript client-side API