It depends on where the file(s) is located. If the file is located at the client's end, no you cannot. However, you can use ASP to generate a client side script to do that. In addition, it depends on what you intend to do with the file. For example, you can use the <INPUT type="file"> to produce the "select file for upload" dialog.
However, in general, the DOM security forbids a script to "touch" the local information of a client.
On the otherhand, if the file(s) is located on the server, you use your ASP to generate a simulated "select file" dialog.
hope this helps.
regards,
- Joseph
~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o
VISIT
I have an .asp page which creates a text file on the users computer full of information from an ODBC linked database. Currently I have a text box where the user types in the full path for the file. I get some complaints that the users would like to be able to browse instead.
The .asp creates a new file, so I would like to have a browse for folder dialogue which updates the chosen folder info into the textbox I have.
Hi hummer010 ... curious, how did you manage to use an ASP (server-side?) script to generate a text file and store in the user's computer at the first place ...
In any event, I don't think there is a built-in dialog for you to select a local file path. If you need this, you will need to build a custom COM object.
regards,
- Joseph
===============
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Visit -->
As it turns out, I'm not creating a text file on the users computer. I never even questioned it until you said I shouldn't be able to.
There are only two of us who use the .asp frequently, and the other user's d: drive is mapped to my d: drive. We put all of the text files on the d: drive so that they are accessible to everyone.
The text files were always showing up where they should, so I never questioned it. After reading your post I checked, and I am NOT creating a text file on the users computer. It just seems like I am because both computers have the same d: drive.
In hind sight, I should have realized that it wasn't placing the file on the users computer simply because it is a server side script. D'oh!!!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.