Click to See Complete Forum and Search --> : FileDialog in JavaScript


Jenny
10-15-2003, 10:08 AM
HI, Khalid,
I post this yesterday.
In my web application, it has one input box and one button. My requirement is when user click the button, it should open the file dialog which explores the local machine's directory, and when user pick the directory from the file dialog, the directory location should show in the input box. eg. user select the temp folder which located in C driver, so the string c:\temp should show in input box.

and this your reply:
file location of course has the directry structure as well,just parse the value in the file element to suite your requirement,

My question is :
Do you mean I can use the <input type="file">, then parse the result string showed in the input box? But the problem is if I select the folder, the filedialog box won't close. Could you explain it more detail?

thanks very much for your time.

Jenny

Khalid Ali
10-15-2003, 10:32 AM
what I meant was a work around.
Select a random file using "file" input type once its selected,then you can manipulate the elements value so that the file name is striped out.
JavaScript has very limitied abilities to reach to the users local resources."file" type element is the only option you have that I know of.

gala
07-09-2008, 07:14 PM
Please check this site:
http://www.ardentedge.com/pr_fd.htm