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.