Title: Set default file names in the upload
My experience with HTML and Forms is that they do NOT allow you to value of a File input form element dynamically or by specifying a default value in the HTML.  Yes, this is a security thing and I thank them for that, don't want any strange hidden File elements off screen accidently submitting my Quicken files to a server.
 
Sean
----- Original Message -----
From: Zhiyong Li
Sent: Thursday, April 26, 2001 7:01 AM
Subject: Set default file names in the upload

This may not be a direct Struts question. But I hope to get the response from here ...

In using the file upload, which is <FORM name=frmGroup ACTION="" METHOD="POST" ENCTYPE="multipart/form-data" onsubmit="return false;">, I would like to set a default value for the file name. However, I cannot find a way to accomplish this. These are the approaches I tried;

        <input type="FILE" name="F0" size=35 value="aa" class="propertyDetail"> <br>

or

        function setDefaultName(){
                document.frmGroup.F0.value="c:\\temp";
        }

I am using IE 5. I was told that for the security reason, the browser does not allow you to do this. I would like to confirm on that.


Thanks for your help,
Zhiyong Li
Platform Development
iBiomatics LLC ,  a SAS Company
(919) 653-2746
[EMAIL PROTECTED]


Reply via email to