Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[e] (0) A brief and vague introduction to form submission.
git-svn-id: http://svn.whatwg.org/webapps@3645 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 17, 2009
1 parent 9336d47 commit 2512f3f
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 6 deletions.
44 changes: 40 additions & 4 deletions index
Expand Up @@ -35966,7 +35966,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme

<p>The corresponding <a href=#attributes-for-form-submission>attributes for form submission</a>
that may be specified on <a href=#concept-submit-button title=concept-submit-button>submit
button</a> are <code title=attr-fs-formaction><a href=#attr-fs-formaction>formaction</a></code>, <code title=attr-fs-formenctype><a href=#attr-fs-formenctype>formenctype</a></code>, <code title=attr-fs-formmethod><a href=#attr-fs-formmethod>formmethod</a></code>, <code title=attr-fs-formnovalidate><a href=#attr-fs-formnovalidate>formnovalidate</a></code>, and <code title=attr-fs-formtarget><a href=#attr-fs-formtarget>formtarget</a></code>. When omitted, they
buttons</a> are <code title=attr-fs-formaction><a href=#attr-fs-formaction>formaction</a></code>, <code title=attr-fs-formenctype><a href=#attr-fs-formenctype>formenctype</a></code>, <code title=attr-fs-formmethod><a href=#attr-fs-formmethod>formmethod</a></code>, <code title=attr-fs-formnovalidate><a href=#attr-fs-formnovalidate>formnovalidate</a></code>, and <code title=attr-fs-formtarget><a href=#attr-fs-formtarget>formtarget</a></code>. When omitted, they
default to the values given on the corresponding attributes on the
<code><a href=#the-form-element>form</a></code> element.</p>

Expand Down Expand Up @@ -36525,7 +36525,43 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme

<p><i>This section is non-normative.</i></p>

<p class=XXX> ... </p>
<p>When forms are submitted, the data in the form is converted into
the form specified by the <a href=#concept-fs-enctype title=concept-fs-enctype>enctype</a>, and then sent to the
destination specified by the <a href=#concept-fs-action title=concept-fs-action>action</a> using the given <a href=#concept-fs-method title=concept-fs-method>method</a>.</p>

<p>For example, take the following form:</p>

<pre>&lt;form action="/find.cgi" method=get&gt;
&lt;input type=text name=t&gt;
&lt;input type=search name=q&gt;
&lt;input type=submit&gt;
&lt;/form&gt;</pre>

<p>If the user types in "cats" in the first field and "fur" in the
second, and then hits the submit button, then the user agent will
load <code title="">.../find.cgi?t=cats&amp;q=fur</code>.</p>

<p>On the other hand, consider this form:</p>

<pre>&lt;form action="/find.cgi" method=post enctype="multipart/form-data"&gt;
&lt;input type=text name=t&gt;
&lt;input type=search name=q&gt;
&lt;input type=submit&gt;
&lt;/form&gt;</pre>

<p>Given the same user input, the result on submission is quite
different: the user agent instead does an HTTP POST to the given
URL, with as the entity body something like the following text:</p>

<pre>------kYFrd4jNJEgCervE
Content-Disposition: form-data; name="t"

cats
------kYFrd4jNJEgCervE
Content-Disposition: form-data; name="q"

fur
------kYFrd4jNJEgCervE--</pre>



Expand Down Expand Up @@ -36794,12 +36830,12 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
of each column. Then, jump to the steps named in that cell and
defined below the table.</p>

<table><tr><td>
<table><thead><tr><td>
<th> <a href=#attr-fs-method-get title=attr-fs-method-GET>GET</a>
<th> <a href=#attr-fs-method-post title=attr-fs-method-POST>POST</a>
<th> <a href=#attr-fs-method-put title=attr-fs-method-PUT>PUT</a>
<th> <a href=#attr-fs-method-delete title=attr-fs-method-DELETE>DELETE</a>
<tr><th> <code title="">http</code>
<tbody><tr><th> <code title="">http</code>
<td> <a href=#submit-mutate-action title=submit-mutate-action>Mutate action</a>
<td> <a href=#submit-body title=submit-body>Submit as entity body</a>
<td> <a href=#submit-body title=submit-body>Submit as entity body</a>
Expand Down
45 changes: 43 additions & 2 deletions source
Expand Up @@ -40265,7 +40265,7 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {

<p>The corresponding <span>attributes for form submission</span>
that may be specified on <span title="concept-submit-button">submit
button</span> are <code
buttons</span> are <code
title="attr-fs-formaction">formaction</code>, <code
title="attr-fs-formenctype">formenctype</code>, <code
title="attr-fs-formmethod">formmethod</code>, <code
Expand Down Expand Up @@ -40939,7 +40939,46 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {

<p><i>This section is non-normative.</i></p>

<p class="XXX"> ... </p>
<p>When forms are submitted, the data in the form is converted into
the form specified by the <span
title="concept-fs-enctype">enctype</span>, and then sent to the
destination specified by the <span
title="concept-fs-action">action</span> using the given <span
title="concept-fs-method">method</span>.</p>

<p>For example, take the following form:</p>

<pre>&lt;form action="/find.cgi" method=get>
&lt;input type=text name=t>
&lt;input type=search name=q>
&lt;input type=submit>
&lt;/form></pre>

<p>If the user types in "cats" in the first field and "fur" in the
second, and then hits the submit button, then the user agent will
load <code title="">.../find.cgi?t=cats&amp;q=fur</code>.</p>

<p>On the other hand, consider this form:</p>

<pre>&lt;form action="/find.cgi" method=post enctype="multipart/form-data">
&lt;input type=text name=t>
&lt;input type=search name=q>
&lt;input type=submit>
&lt;/form></pre>

<p>Given the same user input, the result on submission is quite
different: the user agent instead does an HTTP POST to the given
URL, with as the entity body something like the following text:</p>

<pre>------kYFrd4jNJEgCervE
Content-Disposition: form-data; name="t"

cats
------kYFrd4jNJEgCervE
Content-Disposition: form-data; name="q"

fur
------kYFrd4jNJEgCervE--</pre>



Expand Down Expand Up @@ -41286,12 +41325,14 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
defined below the table.</p>

<table>
<thead>
<tr>
<td>
<th> <span title="attr-fs-method-GET">GET</span>
<th> <span title="attr-fs-method-POST">POST</span>
<th> <span title="attr-fs-method-PUT">PUT</span>
<th> <span title="attr-fs-method-DELETE">DELETE</span>
<tbody>
<tr>
<th> <code title="">http</code>
<td> <span title="submit-mutate-action">Mutate action</span>
Expand Down

0 comments on commit 2512f3f

Please sign in to comment.