473,568 Members | 2,964 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Directory "chooser" for HTML?

I have a particular need to an application . . .

I need users to specify a directory (with path) on their filesystem on
an HTML page. All I need at the server is a string representation of
the path they choose. No file upload. No file names.

Right now, I have users typing in full paths into an <input
type="text"/> element. I would rather a HTML control to allow
them browse to their selected directory. When they hit "OK", or
whatever, the path is stored for subsequent form submission. Then I
can have the value on the server to use.

I prefer IE solutions. I use HTML, JSP, Java, and JavaScript.
I am willing to use tag libraries, if relevant.
Thnak you for thinking about my plight.

badgerduke

Jul 23 '05 #1
4 12951

<ha******@choru s.net> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I have a particular need to an application . . .

I need users to specify a directory (with path) on their filesystem on
an HTML page.
Right now, I have users typing in full paths into an <input
type="text"/> element. I would rather a HTML control to allow
them browse to their selected directory.
<form name="formName" method="POST" action="yourcgi .(exe/php/asp/pl)">
<input type="file" name="fileName" >
</form>
will allow the user to browse to a file.

document.forms['formName']['fileName'].value
will return the complete path if you want to parse it client side
When they hit "OK", or
whatever, the path is stored for subsequent form submission. Then I
can have the value on the server to use.
All I need at the server is a string representation of
the path they choose. No file upload. No file names.
I am assuming you have some kind of script in place to handle the form
data.
When the form is submitted fileName and its value will appear
on the server as one of the name/value pairs and you can parse
out whatever you need.>

I prefer IE solutions. I use HTML, JSP, Java, and JavaScript.
I am willing to use tag libraries, if relevant.
no need and should work in all browsers
HTH
Jimbo
Thnak you for thinking about my plight.

badgerduke

Jul 23 '05 #2

J. J. Cale wrote:
<ha******@choru s.net> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I have a particular need to an application . . .

I need users to specify a directory (with path) on their filesystem on an HTML page.
Right now, I have users typing in full paths into an <input
type="text"/> element. I would rather a HTML control to allow
them browse to their selected directory.
<form name="formName" method="POST"

action="yourcgi .(exe/php/asp/pl)"> <input type="file" name="fileName" >
</form>
will allow the user to browse to a file.

document.forms['formName']['fileName'].value
will return the complete path if you want to parse it client side
When they hit "OK", or
whatever, the path is stored for subsequent form submission. Then I can have the value on the server to use.
All I need at the server is a string representation of
the path they choose. No file upload. No file names.
I am assuming you have some kind of script in place to handle the

form data.
When the form is submitted fileName and its value will appear
on the server as one of the name/value pairs and you can parse
out whatever you need.>

I prefer IE solutions. I use HTML, JSP, Java, and JavaScript.
I am willing to use tag libraries, if relevant.


no need and should work in all browsers
HTH
Jimbo
Thnak you for thinking about my plight.

badgerduke


Thank you for responding. The type="file" input tag requires a user
select a file. I do not want them to choose a file, just a directory.
I prefer to keep this particular input tag out of the file, since it is
misleading and is meant for uploads. I just want to be get the path of
the chosen directory to my server.

Jul 23 '05 #3
In article <11************ **********@z14g 2000cwz.googleg roups.com>,
ha******@chorus .net wrote:
The type="file" input tag requires a user
select a file. I do not want them to choose a file, just a directory.
I prefer to keep this particular input tag out of the file, since it is
misleading and is meant for uploads. I just want to be get the path of
the chosen directory to my server.


That control will not include any 'filepath' at all, just the file
chosen through it. Have visitors enter the filepath in a text control
(type="text") and have sufficient explaining added, preferrably with an
example.

So, in the end you know some filepaths. Then what?

--
Kris
<kr*******@xs4a ll.netherlands> (nl)
Jul 23 '05 #4
In article <11************ **********@f14g 2000cwb.googleg roups.com>,
ha******@chorus .net enlightened us with...
I need users to specify a directory (with path) on their filesystem on
an HTML page. All I need at the server is a string representation of
the path they choose. No file upload. No file names.
<snip>
I prefer IE solutions. I use HTML, JSP, Java, and JavaScript.
I am willing to use tag libraries, if relevant.
Thnak you for thinking about my plight.

IE only client-side solution using WSH see Shell.BrowseFor Folder <URL: http://msdn.microsoft. com/library/default.asp?url =/library/en-us/shellcc/platform/shell/reference/objects/shell/browseforfolder .asp>


You can use that with client-side javascript, jscript, or vbscript.

--
--
~kaeli~
Humpty Dumpty was pushed!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2717
by: hiwa | last post by:
What would be the simplest solution for a JSP or Java servlet letting client retrieve realtime directory listing and directory traversal on the server like output from local ls command or content of Java/general GUI file-chooser/selector window? I mean JSP/servlet output shoud be an HTML form and its content, not a GUIed ftp.
0
1237
by: yotaxp | last post by:
Hello, everyone. I've been trying to get a popup editor going for a control I'm working on. I don't mean a design-time editor for properties, though that would be a good example of what I'm aiming for. I need a control or form to pop up over the form, with input focus, without allowing the parent control to appear unfocused. It would be...
3
3684
by: Akino877 | last post by:
Hello, I am trying to user a File Chooser with DIRECTORIES_ONLY set. And I would like to be able to hide the "Files of type" label and the associated combo box. I wonder if there is a way to do this programmatically or by using NetBeans? Thank you for your help. Akino.
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8117
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7660
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5498
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.