[thelist] File button

Sarah Adams mr.sanders at geekjock.ca
Tue Nov 7 11:20:10 CST 2006


> I have a form where the user can select a file to upload.  When the  
> user wants to edit the information, I refill the form, but it seems  
> that there's no way to refill that button/file that had the upload  
> information.  In replace of that, I put in an inactive text field  
> with the name of the file in it.  Is there a way to instead fill in  
> the file name in the button/field so that they can click browse and  
> select something different if needed?

You can't preset the value of a file upload field, or change the value
with JavaScript, for security reasons.

I usually just put a link to the current file just below the file upload
field - lets the user know there's already a file there, and lets them
view it if need be.

-- 
sarah adams
web developer & programmer
portfolio: http://sarah.designshift.com
blog: http://hardedge.ca



More information about the thelist mailing list