setOKAction( callback ) method

This function sets the OK action to use on WM.

Syntax

setOKAction( callback )

Parameters

Name Type Description
callback anonymous.genericCallbackFunction The function to call when the OK button is pressed.

Example

var callbackFunctionName = function()
{
   alert( "Menu item clicked!" );
}
var okActionFunction = function()
{
   alert( "A OKAY!" );
}
var menuItemCollection = new hwc.MenuItemCollection();
menuItemCollection.setOKAction( "okActionFunction()" );
menuItemCollection.addMenuItem("menu item name", "callbackFunctionName()");

Source

hwc-comms.js, line 626.