Export (0) Print
Expand All

NameCtrl.OnStatusChange Property

Published: May 2010

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


expression.OnStatusChange

expression

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;

Community Additions

ADD
Show:
© 2014 Microsoft