Javascript Reference
Categories: InputTypeFile

javascript InputTypeFile Description

@March 15, 2008, 1:22 a.m.
input (type="file")Firefox/Netscape/NN 3 IE 4 Chrome/Safari/DOM 1  

  

The fileUpload object is a form control generated with an input element whose type attribute is set to "file". The "fileUpload" term does not appear in scripts, but it is the way Netscape casually referred to this object when it was first scriptable.

To submit a file, the form element should have its method attribute set to POST and its enctype attribute set to multipart/form-data. But you also need some server programming to process the incoming data correctly.

 
HTML Equivalent
 
<input type="file">
 
Object Model Reference
 
[window.]document.formName.elementName
[window.]document.forms[i].elements[i]
[window.]document.getElementById("elementID")
 
Object-Specific Properties
 
acceptdefaultValueformnamesizetypevalue
 
Object-Specific Methods
 
handleEvent[ ]select( )
 
Object-Specific Event Handler Properties
 
HandlerFirefox/Netscape/NNIEChrome/Safari/DOM
onblur342
onchange342
onclick642
onfocus342
onkeydown64n/a
onkeypress64n/a
onkeyup64n/a
onmousedown642
onmousemove642
onmouseout642
onmouseover642
onmouseup642
onselect342

Powered by Linode.