Contents | Index | Previous | Next
TDataListenerJS.Tango_receive() Method
receive private session data
Synopsis
Tango_receive(message)
Arguments
message A String Object - the message body.
Returns
Nothing.
Description
TDataListenerJS.Tango_receive() method is a user defined callback. It is
called by the Tango runtime if TDataListenerJS interface has been registered for
receiving session's private messages with TAgentJS.addTDataListenerJS() method.
Example
The HTML document below contains a form "chat" with a text field "tty". The
script on the page defines Tango_receive() function which updates the form with
the received string. Similar code can implement receiving lines of text in a
chat session, or sharing of a form-based interface of an arbitrary application.
<body>
<script>
function Tango_receive(message)
{
document.forms.chat.tty.value=message;
}
</script>
<form name="chat">
<input type="text" name="tty">
</form>
</body>
See Also
TDataListenerJS.Tango_receive() method