aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes input type=file query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "input type=file query" Watch "input type=file query" New topic
Author

input type=file query

Sunetra Sen
Ranch Hand

Joined: Feb 17, 2005
Posts: 43
Hi,
In my html form I have a input type=file.
I want the user to browse and search for a file but want to prevent him from manually entering a file name.
How is this possible?

Thanks and regards,
Sunetra.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
As far as I know, you cant control that.
BTW, why you want to do this?
Sunetra Sen
Ranch Hand

Joined: Feb 17, 2005
Posts: 43
coz i want to prevent the user from typing any fictitious file name!
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can't!
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Eric Pascarello:
You can't!


Now I can speak out loud.

YOU CAN'T!!
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
actually I lied:

<input type="file" onkeypress="return false">

Is that what you want to happen?

Eric
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
In theory, you can put a transparent div on top of editable part of input file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: input type=file query