Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6988251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:03:16+00:00 2026-05-27T19:03:16+00:00

For a given HTML form, is a user agent required to build the submit

  • 0

For a given HTML form, is a user agent required to build the submit request in a particular order?

I was looking through the HTML 4.0.1 Specification and it doesn’t seem to specify the order that "successful controls" become part of the request on submission. Section 17.13.3, Processing form data, states:

When the user submits a form (e.g., by activating a submit button), the user agent processes it as follows.

Step one: Identify the successful controls

Step two: Build a form data set

A form data set is a sequence of control-name/current-value pairs constructed from successful controls

Step three: Encode the form data set

The form data set is then encoded according to the content type specified by the enctype attribute of the FORM element.

Step four: Submit the encoded form data set

At step two, the form data set is described as a sequence, so the order in which it is encoded in Step 3 is presumably fixed. But, this begs the question of what the order of successful controls is in the form data set.

For example, given the following HTML form:

<form action="#" method="GET">
<input type="hidden" name="key1" value="value1" />
<div>
    <div>
        <input type="hidden" name="key2" value="value2" />
    </div>
    <input type="hidden" name="key3" value="value3" />
    <input type="submit" name="submit" value="Submit" />
</div>
<input type="hidden" name="key5" value="value5" />
</form>

Could the form data set be

[ ("key1", "value1"), ("key2", "value2"), ("key3", "value3"), ("submit", "Submit"), ("key5", "value5") ]

(I.e. a depth-first search of the DOM); or

[ ("key1", "value1"), ("key5", "value5"), ("key3", "value3"), ("submit", "Submit"), ("key2", "value2") ]

(A breadth-first search); or even a nondeterministic order resulting from iterating the control-name/current-value pairs in a randomized hashtable?

Testing this form with IE 9 and Firefox 9.0.1, it seems that both use the depth-first search order. Perhaps other browsers are different. The question is whether this order is prescribed somewhere.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:03:17+00:00Added an answer on May 27, 2026 at 7:03 pm

    If you continue to section 17.13.4 of the HTML spec, it states that the default content type is application/x-www-form-urlencoded. The section for that content type says:

    The control names/values are listed in the order they appear in the document.

    This would suggest a depth-first traversal and would seem to agree with your browser tests.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the following HTML form: <form id=myform> Company: <input type=text name=Company value=ACME, INC./> First
I'm looking for a general purpose API/web service/tool/etc... that allows convert a given HTML
Ugh! Any ideas? Have a form which tracks user activity for given time intervals.
I have a html file which select images from user's computer.code is given bellow
I have a html file which select images from user's computer.code is given bellow
I am displaying an list of Items for a given Order. When a user
Take this scenario for an example: User types http://example.com/index.html into my form Form is
I have a fairly long HTML form that the user fills out. After filling
I have a necessity to sort a given HTML table of the following structure,
Basically, I would like to decode a given HTML document, and replace all special

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.