tags:

views:

28

answers:

1
<form><label for="attachment">Attachment:</label> <input type="file"  
name="attachment" id="attachment"><input type="submit"></form> 

i want to attach the file path to a form. i am doing it using the following code. but i want that the pop up window should open to a specified path. say D:\newfolder, so that user need not go to D: and then newfolder to attach the file.
is there any way i can set this predefined path.

any help is really appreciated and also i am really sorry for formatting , i dont know how to format it.

+3  A: 

This can't be done in any browser for security reasons.

As far as I know, It's also not possible using a Flash-based uploader like SWFUpload.

You may be able to pre-set the path using an alternative Java-based uploader that has more liberal access to the client's computer, but this feature is hardly worth making the switch to that technology and the additional requirements and hassles it brings along.

Pekka
I was about to post the same link , but hit refresh first.
Midday
but i am not attaching any file to server. i just need the file path that too on my local server, still not possible?
sushant
If you just need the file path, and you know what it is … use a text or hidden input.
David Dorward
i dont know the path. it depends on the file the user chooses
sushant
@sushant ahh I see, you need only the file path and not the file itself. I'm afraid that is not possible reliably either, the user will have to copy+paste the path into a text field.
Pekka