HighDots Forums  

List files of a directory in client side

Javascript JavaScript language (comp.lang.javascript)


Discuss List files of a directory in client side in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hamed
 
Posts: n/a

Default List files of a directory in client side - 07-07-2005 , 05:47 AM






Dear Folks

I am programming a page that asks user a directory name and lists files
of type *.xls in the directory in client's machine. He/She will then
select some files to upload them to the server.

Is there any way to ask a directory name and then list the files of
that directory in client's machine? The typical browser that is used is
IE but I am not allowed to use ActiveX objects.

I found http://tinyurl.com/a4hhs the message talked about it but it
seems it is about server side file listing not client side.

Any help is highly appreciated.

Regards


Reply With Quote
  #2  
Old   
VK
 
Posts: n/a

Default Re: List files of a directory in client side - 07-07-2005 , 06:08 AM






Quote:
Is there any way to ask a directory name and then
list the files of that directory in client's machine?
The typical browser that is used is
IE but I am not allowed to use ActiveX objects.
No.

You can:
1) Use properly signed Java swing applet with JFileChooser.

2) Buy a 3rd party signed object/plugin.

In both above cases you're still dependable on user decision - grant
permissions or not.

3)
<form method="post" action="action.cgi" enctype="multipart/form-data">
Please choose XLS files you want to download:<br>
<input type="file" name="file1"><br>
<input type="file" name="file2"><br>
...
</form>



Reply With Quote
  #3  
Old   
ASM
 
Posts: n/a

Default Re: List files of a directory in client side - 07-07-2005 , 06:52 AM



Hamed wrote:
Quote:
Dear Folks

I am programming a page that asks user a directory name and lists files
of type *.xls in the directory in client's machine. He/She will then
select some files to upload them to the server.

Is there any way to ask a directory name
because you know exactly the path of this directory ?
on a foreign machine ?

Quote:
and then list the files of
that directory in client's machine? The typical browser that is used is
IE but I am not allowed to use ActiveX objects.

I found http://tinyurl.com/a4hhs the message talked about it but it
seems it is about server side file listing not client side.
all what I know is
<form>
Select a file <imput type=file> and validate (button)
</form>



--
Stephane Moriaux et son [moins] vieux Mac


Reply With Quote
  #4  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: List files of a directory in client side - 07-17-2005 , 06:17 AM



Hamed wrote:

Quote:
I am programming a page that asks user a directory name and lists files
of type *.xls in the directory in client's machine. He/She will then
select some files to upload them to the server.

Is there any way to ask a directory name and then list the files of
that directory in client's machine?
Yes, use

<input
type="file"
name="..."
accept="application/vnd.ms-excel,application/msword">.

It may not filter for Excel files as it should, but at least the user
can select the file. And, more important, it works with plain HTML.


PointedEars


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.