NameCtrl.OnStatusChange Property

Applies to: SharePoint Foundation 2010

Gets the name of the function to call for handling status changes.

expression.OnStatusChange

Parameters

expression

An expression that returns a NameCtrl Control object.

Return Value

A string that contains the name of the function.

Remarks

The handler function that you provide is called for every user whose status is tracked through the NameCtrl.GetStatus Method method and whose online status changes.

The handler function should take three parameters. The first parameter is the sign-in name of the user, the second parameter is the new status, and the third parameter is the same ID that is passed to the GetStatus method.

For the handler function to update the correct DIV section with the proper pawn icon, pass to the GetStatus method the ID of an HTML <DIV> tag. Alternatively, you can ignore this ID, search the page for the sign-in name, and change the associated pawn icon.

Example

The following example outlines a possible format for the event handler:

function MyOnStatusChange(name, status, id)
{
    // body of the function
}

NameObj.OnStatusChange = MyOnStatusChange;