NameCtrl.OnStatusChange Property
Collapse the table of content
Expand the table of content

NameCtrl.OnStatusChange Property

Last modified: January 15, 2010

Applies to: SharePoint Foundation 2010

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



An expression that returns a NameCtrl Control object.

A string that contains the name of the function.

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.

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

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

NameObj.OnStatusChange = MyOnStatusChange;
© 2016 Microsoft