This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes Filtering the file names Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Filtering the file names" Watch "Filtering the file names" New topic
Author

Filtering the file names

Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
Hi,
I have a web page where the input type is file field.When I click on the browse button I
want to show all the files which has the extension .csv when the Upload dialoque box is displayed on the screen.Is it possible to do it in the front end using Java script
Thx in advance
cer
Greenhorn

Joined: Sep 28, 2002
Posts: 8
yes
you can realize it with javascript or servlet :roll:


Nice to meet you here.<br />I will learn from you.
Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
hey cer thx for ur reply..
can u guide me how it can be done???
Ravi Kumar Ravuru
Ranch Hand

Joined: Apr 18, 2002
Posts: 176
Hello Mary,
Please look at the following link
http://javascript.internet.com/forms/upload-filter.html
where the javascript function filters the files. Hope it will help u.
Ravi
Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
hey ravi,,
can i filter the file names at the window dialogue level(i mean when the file dialogue box opens)
Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
Hello,
Any idea on this..pls respond
Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
Any luck guys?
Sreenivasa Majji
Ranch Hand

Joined: Jul 12, 2001
Posts: 224
Unfortunately the answer is NO. Because the dialog is a component of browswer and we don't have a control on that. I had exact requirement ( I have to upload only .xls files). So we used the script mentioned in the previous message.
If you find any better solution, please update us.
Happy holidays,
Sreenivasa Majji.


Sreenivasa Majji
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Filtering the file names