FileUpload.value

JavaScript 1.0+ Nav2+, Opera3+ Syntax

							fileupload.value

Description

The value property of the FileUpload object specifies the filename of the file selected or input by the user.

Example

Listing 7.252 shows how to access the value property. The form object is used in conjunction with the upload box name to get the value attribute of the FileUpload box.

Listing 7.252 Accessing FileUpload Value Property
 <html> <head> <title>Using the value property of the FileUpload object</title> </head> <body> <script language="JavaScript"> <!-- Hide function showFile(){ var input = document.form1.uploadbox.value; alert("The filename entered is: " + input); } // End Hide ---> </script> <form name="form1"> Please select a file. <input ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.