logo

Response

« Return to the main article

You are viewing this page out of context. To see it in the context it is intended please click here.

About This Page

Reply posted by Kim on Wed 13 Dec 2000 in response to Checking for attachments in JavaScript

How to clear the value of the FileUpload Control

i'd like to clear the value of the Fileupload control when use click a button.
my code is like this :
for(var e=0 ; e<document.forms[0].elements.length ; e++)
if( document.forms[0].elements[e].type=='file'){
alert(document.forms[0].elements[e].value);
document.forms[0].elements[e].value='';
}


'alert' is ok, but setting value doesn't work. the value is read-only?? do you
have any idea?