PromptSelectFunction Property for French (Canada)
Gets or sets the name of a client-side routine that specifies prompt text for the CreditCardNumber control. Read/write.
Usage
ASP.NET markup: | <speech:CreditCardNumber PromptSelectFunction="..." /> |
Get value: | String = CreditCardNumber.PromptSelectFunction; |
Set value: | CreditCardNumber.PromptSelectFunction = String; |
Data type: | String |
Required: | No |
Remarks
When the Speech Platform plays the prompt, it attempts to use recorded text from a PromptDatabase, and synthesizes the text if recorded text is not found.
The value of the PromptSelectFunction property is the name of a custom client-side script function, without parameters or parentheses. The client-side dialog manager calls this function, using the following syntax, after the control has been activated and before the prompt playback begins.
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 ( object control )
{
// Client-side code referenced by CreditCardNumber.PromptSelectFunction
}
Parameters
- control
The Application Speech Control object.
Return Value
A string containing the prompt text to be played, or a null string. If the function returns a null string, the inline prompt is played. Application Speech Controls contain built-in prompts for question, confirm, silence, noreco and help. The default behavior is to play the silence, noreco or help prompt if appropriate followed by the question or confirm prompt.
ActiveQAPhase values
The ActiveQAPhase property of the client-side CreditCardNumber object may be one of the following values:
- question
- confirm
- questionFirstDigit4
- questionSecondDigit4
- questionThirdDigit4
- questionLastDigit4
- questionFirstDigit5
- questionFirstDigit6
- acknowledge
- confirmFirstDigit4
- confirmSecondDigit4
- confirmThirdDigit4
- confirmLastDigit4
- confirmFirstDigit5
- confirmFirstDigit6
Example
The following example demonstrates the PromptSelectFunction routine. Confirmation prompts are not shown.
<script language="jscript">
function myPromptSelectFunction(obj) {
if (obj.ActiveQAPhase == "questionFirstDigit4") {
return "quels sont les quatre premiers chiffres?";
}
if (obj.ActiveQAPhase == "questionSecondDigit4") {
return "quelle est la deuxième série de quatre chiffres?";
}
if (obj.ActiveQAPhase == "questionThirdDigit4") {
return "quelle est la troisième série de quatre chiffres?";
}
...
}
</script>
<form id="Form1" method="post" runat="server">
...
<speech:CreditCardNumber
ID="GetCreditCardNumber"
SemanticItem="siCCNumber"
QuestionPrompt="rentrer les 16 chiffres de votre numéro de carte de crédit s'il-vous-plaît"
PromptSelectFunction="myPromptSelectFunction"
runat="server">
</speech:CreditCardNumber>
<speech:CreditCardDate
ID="GetCreditCardDate"
QuestionPrompt="quel est la date d'expiration?"
MonthSemanticItem="siCCMonth"
YearSemanticItem="siCCYear"
runat="server">
</speech:CreditCardDate>
...
</form>
See Also
CreditCardNumber Class | CreditCardNumber Constructor | CreditCardNumber Members | CreditCardNumber Properties | CreditCardNumber Methods | CreditCardNumber Events | CreditCardNumber Remarks