FILE is a TYPE attribute value to the INPUT element for FORMs. It
allows the user to enter a filename that can be used as input for the
form. To allow this, the author must specify a new ENCTYPE attribute
value in the FORM element: ENCTYPE="multipart/form-data"
Description:
This attribute specifies the MIME types that the form processing server
and script should correctly handle. A browser may use this information to
filter out non-conforming files when prompting a user to select files to upload.
Values:CDATA.
[Comma-separated list of MIME types.]
Description:
This is a method of giving access/focus to an active HTML element using
a keyboard character. This is a common GUI paradigm also known
as a "keyboard shortcut" or "keyboard accelerator"
A single character is used as the value of this attribute. In addition,
a platform-dependent key is usually used in combination with the
ACCESSKEY character to access the functionality of the active field.
Values:CDATA.
[A single, case-insensitive character from a browser's character set.]
Align
[2|3|3.2|4]
[X1|X1.1]
[IE|M|N6B1|O]
Standards Details:
Deprecated in HTML 4.x/XHTML 1.0. Dropped in XHTML 1.1 in favor of CSS.
Required? No
Description:
This attribute specifies the alignment of text following the INPUT
reference relative to the field on screen. LEFT and RIGHT specify
floating horizontal alignment of the form field in the browser window,
and subsequent text will wrap around the form field. The other options
specify vertical alignment of text relative to the form field on the
same line.
Values:Left | Right |
Top | Texttop |
Middle | Absmiddle |
Baseline | Bottom |
Absbottom
Description:
This is a stand-alone attribute which indicates the element is
initially non-functional. Disabled form elements should not be submitted
to the form processing script.
Description:
This optional attribute constrains the number of characters that can
be entered into the filename entry field by the user. If the MAXLENGTH
attribute is larger than the optional SIZE attribute, the filename entry
field should scroll as necessary.
Description:
"Tabbing" is a method of giving access/focus to an active HTML
element using a standard keyboard sequence. All the active elements in a
document can be cycled through using this sequence (ex: Windows TAB key.)
The order of the active elements in this cycle is usually the order they
occur in the document, but the TABINDEX attribute allows a different order
to be established. The use of this attribute should create the following
tabbing order cycle if the browser supports the attribute:
Active elements using the TABINDEX attribute with positive integers are
navigated first. Low values are navigated first.
Active elements not specifying any TABINDEX attribute
Those elements carrying a DISABLED attribute or using negative TABINDEX
values do not participate in the tabbing cycle.
Support for the back-end server processes that this element requires is
not universal. Large-scale hosting communities (such as Geocities) do
not support INPUT TYPE=FILE functionality (so I am told.)
Browser Peculiarities
[Test]
Internet Explorer and Netscape do not use the VALUE attribute
as the default contents of the input area. Any default value set via
HTML is not usable via scripting and the DOM as well (hence it is not
listed as 'supported' in any of the browsers.) If a user enters text
in the field however, that value is then reachable via the DOM as
it normally would be for a normal INPUT field (via the .value property.)
The reason for this behavior would presumably be to ensure the
security/safety of users against malicious authors. Opera displays the
default VALUE attribute value and submits it as well (although it prompts
for confirmation on submit if you have not altered that value.)
[Test]
Netscape 2+ only supports the onChange event handler attribute in cases
where the user enters or modifies text via the text box; if the
"Browse..." button is the only thing used, the event is not fired.
Internet Explorer 4.0+ fires the event in both cases.
[Test]
Netscape 4+ allows some Character-level formatting to be applied to the
contents of this form field. These physical formatting elements (along with
virtual formatting elements that are rendered identically, such as
EM and I) apply to this form field: I, U, S, STRIKE, SUB, SUP, BIG,
SMALL, FONT SIZE and FONT FACE.
[Test]
Using a READONLY attribute in IE4 and IE5 on this element still allows
a user to invoke the file...open dialog (from the "Browse..." button),
although the text field is not directly editable. In IE5.5 plus, both the
text field AND the file...open dialog are not usable.
[Test]
Opera 5/6: Using the DISABLED attribute still sends the name/value pair
for the element to the form processing script. It should not do this.