OBJECT:
FileUpload
A
FileUpload object provides a field in which the user
can enter a file name to be uploaded and used as input and is created
with every instance of an HTML <INPUT> tag (with the 'type' attribute
set to 'file') on a form. These objects are then stored in the elements
array of the parent form and accessed using either the name defined within
the HTML tag or an integer (with '0' being the first element defined,
in source order, in the specified form).
PROPERTIES
form Property
This property returns a reference to the parent Form of the FileUpload
object.
Syntax: object.form
name Property
This property sets or returns the value of the FileUpoad object's
name attribute.
Syntax: object.name
type Property
Every element on a form has an associated type property. In the
case of a FileUpload object, the value of this property is always
'file'.
Syntax: object.type
value Property
This property sets or returns the FileUpload object's value
attribute. This is a string input by the user that specifies the file
to upload.
Syntax: object.value
METHODS
blur Method
This method removes the focus from the specified FileUpload
object.
Syntax: object.blur(
)
click Method
This method simulates a mouse-click on the FileUpload object.
Syntax: object.click(
)
focus Method
This method gives focus to the specified FileUpload object.
Syntax: object.focus(
)
handleEvent Method
This method calls the handler for the specified event.
Syntax: object.handleEvent(event)
EVENT HANDLERS
onBlur Event handler
This event handler executes some specified JavaScript code on the occurrence
of a blur event (when the FileUpload object loses focus).
Syntax: object.onBlur="myJavaScriptCode"
onChange Event handler
This event handler executes some specified JavaScript code on the occurrence
of a click event (when the FileUpload object loses focus
and its value has altered).
Syntax: object.onClick="myJavaScriptCode"
onFocus Event handler
This event handler executes some specified JavaScript code on the occurrence
of a focus event (when the FileUpload object receives focus).
Syntax: object.onFocus="myJavaScriptCode"
|