Contents | Index | Previous | Next


TAgentJS.addTParticipantsListenerJS() Method

subscribe for participants updates

Synopsis

Tango_agent.addTParticipantsListenerJS(document);

Arguments

document Object implementing TParticipantsListenerJS interface. A document to receive participants updates.

Returns

Nothing.

Description

The function adds a recipient of notification about participants' entries to and exits from the session.

Example

Truly collaboratory applications identify session's participants to mark data or direct information flow. The way to be up to date regarding who is in session is to subscribe for participant messages by calling addTParticipantsListenerJS().

<script>

Tango_agent.addTParticipantsListenerJS(this);

function Tango_participantJoined(participantName)

{

alert("New participant joined the session: "+participantName);

}

function Tango_participantLeft(participantName)

{

alert("Participant left the session: "+participantName);

}

</script>

See Also

TParticipantsListenerJS interface, TAgentJS.removeTParticipantsListenerJS() method