/    Sign up×
Community /Pin to ProfileBookmark

FileDialog in javascript?

Hi everyone,

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.

I know use <input type=file>, but it only pick up the file location, this is not what I wanted.

Any help will be appreciated.

Jenny

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliOct 14.2003 — file location of course has the directry structure as well,just parse the value in the file element to suite your requirement,
Copy linkTweet thisAlerts:
@JennyauthorOct 14.2003 — thanks,

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?

Jenny
×

Success!

Help @Jenny spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...