i know you can use a php script, but i can't type it. ask in the php directory, is very easy, hope experts answer quickly :)
Main Topics
Browse All TopicsI am writing a HTML which basically selects a file to be parsed (eventually I am calling a servlet). This works fine with :
<input type=file name=uploadfile value='SelectFile'>
I would like to store the result in a directory as a .txt file. I am not able to select a directory where from my HTML. Does anyone have an idea how to do it either inHTML or JSP..
Thanks
Aarschie
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
for security reasons you cannot preset the contents of a file input type. You also cannot change its value using javascript. This is to prevent websites uploading files from your computer that you haven't said they could upload.
You may be able to do it using a java applet or activex component or some other plugin.
Hi Arschie,
maybe you can adapt this:
function doit(contents)
{
var contents = document.a.c.value;
var txtFile = document.a.b.value;
var fso, f1, ts, s
var ForWriting= 2;
fso = new ActiveXObject("Scripting.F
ts = fso.OpenTextFile(txtFile, ForWriting)
ts.WriteLine(contents)
ts.Close()
}
//-->
</script>
</head>
<body>
<form name="a">
<input type="file" name="b">
<textarea name="c"></textarea>
<input type="button" value="do it" onclick='doit()'>
</form>
</body>
</html>
Vinny
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: VincentPuglia {http:#9613615}
Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
mplungjan
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: GaryC123Posted on 2003-10-21 at 18:42:57ID: 9595619
In just HTML no, and in JSP I don't think so. s/index.ht ml
Heres a link that may be handy
http://www.servlets.com/co
Incidentally you cant set the value of a File tag.