Share via


OnClientKeyPress Property for French (Canada)

  Microsoft Speech Technologies Homepage

Gets or sets the name of a client-side script function called on every telephone keypress. Read/write.

Usage

ASP.NET markup: <speech:IDtmf OnClientKeyPress="..." />
Get value: String = IDtmf.OnClientKeyPress;
Set value: IDtmf.OnClientKeyPress = String;
Data type: String
Required: No

Remarks

If a Prompt is playing, OnClientKeyPress triggers an onbargein event on the Prompt, which stops its playback if its BargeIn property is True. If a Reco is active, the first OnClientKeyPress event will disable the Reco time-outs.

The value of the OnClientKeyPress property is the name of a custom client-side script function, without parameters or parentheses. This function is called by the client-side dialog manager.

Syntax

function FunctionName ( int status )
{
     // Client-side code referenced by IDTMF.OnClientKeyPress
}

Parameters

  • status
    The code returned in the event object.

Return Value

None.

Example

<script>
  function myClientKeyPress() {
    // OnClientKeyPress routine
    return true;
  }
</script>

<form id="Form1" method="post" runat="server">
  ...
  <speech:date 
    id="Date1" 
    QuestionPrompt="quand est-ce que vous aimeriez voyager?" 
    DateContext="Future"
    AllowHolidays="True"
    AllowNumeralDates="True"
    AllowRelativeDates="True"
    DaySemanticItem="DaySemItem" 
    MonthSemanticItem="MonthSemItem"
    YearSemanticItem="YearSemItem" 
    ConfirmThreshold="0.6"
    AllowDTMF="True"
    InterDigitTimeout="5000"
    OnClientKeyPress="myClientKeyPress"
    runat="server">
  </speech:date>

  <asp:textbox id="tbDay" runat="server"></asp:textbox>
  <asp:TextBox id="tbMonth" runat="server"></asp:TextBox>
  <asp:TextBox id="tbYear" runat="server"></asp:TextBox>
  ...
</form>

See Also

IDtmf Interface | IDtmf Members | IDtmf Properties