id Attribute
Identifies a dtmf element within a document. Optional.
<dtmf id = "uniqueName" >
Remarks
If the id attribute is used, it must be a valid Extensible Markup Language (XML) name that is unique within the document where the dtmf element appears.
Example
The following code demonstrates the use of the id 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 | endsilence Attribute | initialtimeout Attribute | interdigittimeout Attribute | preflush Attribute