Last Updated: 11-08-2005
enctype = "encoding_type"
expr = "ECMAScript_Expression"
fetchaudio = "URI"
fetchaudioexpr = "ECMAScript_Expression"
fetchhint = "string"
fetchtimeout = "string"
maxage = "seconds"
maxstale = "seconds"
method = "string"
namelist = "string"
next = "URI"/>
|application/x-www-form-urlencoded||The data is submitted using the encoding described in Section 2.2 of RFC 1738. This results in name/value pairs sent to the server as name1=value1&name2=value2... with space characters replaced by "+" and reserved characters (like "#") replaced by "%HH" where HH is the ASCII code of the character in hexadecimal. Line breaks are encoded as "%0D%0A" - a carriage return followed by a line feed.|
|multipart/form-data||The data is submitted using the encoding described in RFC 2388. The encoding provides an efficient means for sending large quantities of binary data or text containing non-ASCII characters. When submitting a variable that references recorded audio, the enctype is automatically set to "multipart/form-data".|
|prefetch||Documents may be prefetched.|
|safe||Documents may only be fetched when needed, never before.|
|GET||The request is submitted using the GET method.|
|POST||The request is submitted using the POST method.|
|block, catch, error, filled, foreach, help, if, noinput, nomatch, prompt|
|The next and expr attributes are mutually exclusive.|
|The namelist, method, and enctype attributes are only relevant if the submit element navigates to a server-side script (e.g. CGI).|
|The submit element can only be used to navigate to another document. To navigate to a dialog in the current document, use the goto element or the subdialog element.|
|If you submit any variables that store data returned by the record element, the value of the enctype attribute is forced to multipart/form-data.|
|If any of the fetchtimeout, fetchhint, maxage, or maxstale attributes is not specified for a submit element, then the value of the fetchtimeout, documentfetchhint, documentmaxage, or documentmaxstale property, respectively, is used.|
|Prior to revision 3, the interpreter ignores any undeclared variables in the namelist attribute. In revision 3 and later, the interpreter throws error.semantic if any of the variables is undeclared.|
|Prior to revision 3, if a transition occurs as a result of a submit between an application leaf document and its own application root document, the application root document is not reinitialized. In revision 3 and later, it is.|
The following example requests the name of a subject from the user. The value returned from the grammar is submitted to a CGI script that returns the classes available for that subject.
<?xml version="1.0"?> <vxml version="2.1" xmlns="http://www.w3.org/2001/vxml"> <script> <![CDATA[ var aSubjects = ["overview", "design", "audio", "development", "tuning"]; ]]> </script> <form id="get_subject"> <field name="subject_id"> <prompt> When you hear the name of the subject you want, just say it. <foreach item="subject" array="aSubjects"> <value expr="subject"/> </foreach> </prompt> <grammar src="subjects-voice.grxml" mode="voice" type="application/srgs+xml"/> <filled> <submit next="classes_by_subject.cgi" namelist="subject_id" /> </filled> </field> </form> </vxml>