Share via


onreceive Event

  Microsoft Speech Technologies Homepage

Occurs when the browser receives a platform message.

HTML <smex onreceive="eventHandler()">
JScript smex.onreceive = eventHandler;
Named Script <SCRIPT FOR = smex EVENT = onreceive>

Remarks

If the smex element contains any bind elements, those bindings are processed before the onreceive event is initiated. Before the onreceive event begins, the received property is updated with the message content and the status property is set to zero, indicating successful message receipt.

Although it does not receive properties directly, the event handler can query the status property of the smex element for data about the event.

Example

The following code demonstrates the use of the onreceive event.

<smex id="mySmex" onreceive="onSmexReceive()" onerror="onSmexError()" ontimeout="onSmexTimeout()"/>
...
function onSmexReceive() {
  LogMessage("Received smex message: "+mySmex.received.xml);
}

See Also

smex Element |  onreceive Event | bind Element