… keine Ahnung, was jetz das konforme ist,
nur frag ich mich, welchen Value der Firefox bei mehreren
Submittbuttons überträgt. Ist da einer W3C-konformer als die
anderen?
Grüße,
Dietmar
Ich erklär es halt mal :
http://www.w3.org/TR/1998/REC-html40-19980424/intera…
17.13.3 Processing form data
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
Sagt das nur Erfolgreiche Controls gesendet werden.
17.2.1 Control types
HTML defines the following control types:
buttons
Authors may create three types of buttons:
**\* submit buttons: When activated, a submit button submits a form. A form may contain more than one submit button.**
\* reset buttons: When activated, a reset button resets all controls to their initial values.
\* push buttons: Push buttons have no default behavior. Each push button may have client-side scripts associated with the element's event attributes. When an event occurs (e.g., the user presses the button, releases it, etc.), the associated script is triggered.
und
http://www.w3.org/TR/1998/REC-html40-19980424/intera…
17.13.2 Successful controls
A successful control is "valid" for submission. Every successful control has its control name paired with its current value as part of the submitted form data set. A successful control must be defined within a FORM element and must have a control name.
However:
\* Controls that are disabled cannot be successful.
**\* If a form contains more than one submit button, only the activated submit button is successful.**
\* All "on" checkboxes may be successful.
\* For radio buttons that share the same value of the name attribute, only the "on" radio button may be successful.
\* For menus, the control name is provided by a SELECT element and values are provided by OPTION elements. Only selected options may be successful.
\* The current value of a file select is a list of one or more file names. Upon submission of the form, the contents of each file are submitted with the rest of the form data. The file contents are packaged according to the form's content type.
\* The current value of an object control is determined by the object's implementation.
If a control doesn't have a current value when the form is submitted, user agents are not required to treat it as a successful control.
Und nocht FROM submit :
http://www.w3.org/TR/1998/REC-html40-19980424/intera…
17.3 The FORM element
Eine Form darf mehrere Submit buttons haben, nur der angeklickte Button sendet seinen wert. Die Return Taste löst nun das eigene FORM OnSubmit aus (genau das gleiche script was mit dem submit button implizit erfolgt). Da kein Submitbutton angeklickt wird, sollte auch keine Successful sein und somit keine Übertragung des submits erfolgen, weil eben keins da ist . Das der FireFox sich sagt egal, solange ich ein Submit Button habe ist der eben der einzige und damit immer aktive, ist aber nicht gerade W3C conform.
Ergo beim IE kann ich 2 Zustände unterscheiden „nur return“ oder „submite button“ währen ich beim FireFox das nciht ermitteln kann. Und bei 3 Buttons würd mich das eher wundern wenn der FireFox selber wählt.
P.S. eine Form braucht keinen INPUT typ:Submit um mit Return abgeschickt zu werden, wenn man eine Eingabe Tätigen kann.