OnClientKeyPress Property
Gets or sets the name of a client-side function that is called when the platform detects a grammatically valid DTMF key press. Read/write.
Usage
ASP.NET markup: | <speech:Dtmf OnClientKeyPress="..." /> |
Get value: | String = Dtmf.OnClientKeyPress; |
Set value: | Dtmf.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.
The script block that contains this function should be placed before the control that calls the function. For more information, see "Placement of Script Blocks" in Authoring Notes.
Syntax
function FunctionName ( int status )
{
// Client-side code referenced by DTMF.OnClientKeyPress
}
Parameters
- status
The code returned in the event object.
Return Value
None.
Example
<form id="Form1" method="post" runat="server">
<script>
function myClientKeyPress() {
// OnClientKeyPress routine
return true;
}
</script>
...
<speech:Dtmf runat="server"
ID="Dtmf1"
PreFlush="True"
InitialTimeout="2500"
InterDigitTimeout="2500"
EndSilence="2000">
OnClientKeyPress="myClientKeyPress"
</speech:Dtmf>
...
</form>
See Also
Dtmf Class | Dtmf Constructor | Dtmf Members | Dtmf Properties | Dtmf Methods | Dtmf Events | Dtmf Remarks