input type="file" question

liunx

Guest
I am trying to get a file name and path from the user. I am using input type="file" and it works fine except I really need to initialize the file name and path and have the browse window start there with the file name I have put in. I tried using the VALUE="path\name" but it isn't working. I am doing something wrong or is this not possible? <br />
<br />
Thanks<br />
<br />
<input TYPE="FILE" NAME="txtFileName" VALUE="S:\dir1\dir2\filename.txt" ALLOW="text/*"><!--content-->You cannot pre-value a input type file. It is part of built in security. Think about it, would you want to use a browser that allowed websites to set the value, which would then allow them to take files off of your computer with out your permission?<!--content-->Actually, I really don't want to get a file. I just want the path and file name to pass on to a server side program but I want them to be able to browse for the path and change the file name that I selected if they want to. Is there a better way to do it?<!--content-->Just put the name in a textbox. If you input type file it is going to try and upload a file, and that is not what you want anyway.<!--content-->I would really like them to be able to browse for the location they want to put it in without making them type in directory names (this always leads to typos). Is there no way to do that?<!--content-->no way to do that unless you use the input type=file tag. wha tyou want to do can't be done with traditional means, serverside language cannot get to teh users machine and javascript (might) be able to but I don't think so.<br />
<br />
there is too much security risk to hav ethe user browse without the file tag.<!--content-->
 
Back
Top