wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes File Download/Create - To a user specified directory and name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "File Download/Create - To a user specified directory and name" Watch "File Download/Create - To a user specified directory and name" New topic
Author

File Download/Create - To a user specified directory and name

Priyaa Vijay
Greenhorn

Joined: Mar 10, 2005
Posts: 9
Hi,

I know how to show a popup dialog box for uploading a file. I write

<input type="file" name="datafile" size="40">

it shows a TextField and a Browse button on clicking which I get a "Choose File" window and I navigate to the desired directory and a file.

What I am looking for is the reverse. I want something like a File Save as dialog, ie the user clicks a button and we allow him to choose the directory and then in that dialog he types the filename and clicks ok. Then we go and create that file and write some contents to it.

How to achieve this in html?


Thanks,<br />Priya
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
There is nothing to achieve that in HTML.

Eric
Priyaa Vijay
Greenhorn

Joined: Mar 10, 2005
Posts: 9
Thanks for the reply. I shall try to find out what is the alternate solution.
Priyaa Vijay
Greenhorn

Joined: Mar 10, 2005
Posts: 9
Is there a way to achieve this using javascript or anything else on a Web Page? Appreciate any inputs.

thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
JavaScript can not access the clients computer for major security reasons, you may be able to find an activeX or applet that can do it, but I have no other solution than those ideas.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Download/Create - To a user specified directory and name
 
Similar Threads
Displaying directories only using FileDialog
Browse Button validation
CREATING FILE FROM SERVLET
write the contents that we read from a file to a textbox.
adding a save method