Partager via


interdigittimeout Attribute

  Microsoft Speech Technologies Homepage

Specifies, in milliseconds, the time-out period between DTMF presses after the first press is recognized.

HTML <dtmf interdigittimeout="timePeriod">
JScript dtmf.interdigittimeout = timeperiod

Remarks

If the period between DTMF keypresses exceeds the time period specified by the interdigittimeout attribute, an onnoreco event is raised and the status property is set to -16. An interdigittimeout value of 0 disables the time-out.

The range of values that can be assigned to the interdigittimeout attribute is from 50 to 60000 milliseconds, inclusive. If interdigittimeout is not specified, the default value of 10000 milliseconds, or 10 seconds is used. If the programmer attempts to enter a value that is outside the acceptable range, the nearest in-range value is used.

Example

The following code demonstrates the use of the interdigittimeout attribute.

<html xmlns:salt="http://www.saltforum.org/2002/SALT">
  ...
  <body>
    <input type="text" name="iptAreaCode" onFocus="dtmfAreaCode.Start()" />
    <input type="text" name="iptPhoneNumber" />
    ...
    <salt:dtmf id="dtmfAreaCode" onkeypress="dtmfKeyPressHandler()" onreco="dtmfPhoneNumber.Start()"    onsilence="dtmfSilenceHandler()" onerror="dtmfErrorHandler()" onnoreco="dtmfErrorHandler()"    initialtimeout="5000" interdigittimeout="2000" preflush="true">
      <!-- grammar result will contain "smlAreaCode" node -->
      <salt:grammar src="3digits.grxml" />
      <salt:bind value="//smlAreaCode" targetelement="iptAreaCode" />
    </salt:dtmf>
    <salt:dtmf id="dtmfPhoneNumber" onkeypress="dtmfKeyPressHandler()" onerror="dtmfErrorHandler()"    initialtimeout="5000" interdigittimeout="2000" preflush="true">
       <!-- grammar result will contain "smlPhoneNumber" node -->
      <salt:grammar src="7digits.grxml" />
      <salt:bind value="//smlPhoneNumber" targetelement="iptPhoneNumber" />
    </salt:dtmf>
    <script language="jscript">
    <!--
      function dtmfSilenceHandler() {
        ...
      }
  
      function dtmfErrorHandler() {
        ...
      }
      
      function dtmfKeyPressHandler() {
        ...
      }
      -->
      </script>
  <body>
</html>

See Also

dtmf Element |  onnoreco Event | status Property